Merge remote-tracking branch 'origin/cc_20250325_select' into cc_20250325_select

This commit is contained in:
苏竹红
2025-04-13 20:59:06 +08:00
33 changed files with 312 additions and 91 deletions

View File

@@ -87,7 +87,7 @@ public enum ErrorCodeEnum {
LINE_PAY_IS_NOT_EXIST(500019, "意向金信息不存在!", null),
INTENT_PASS(500020, "审核已通过,请刷新页面!", null),
APPOINTMENT_TIME_FAIL(500020, "预约失败,请刷新后再试", null),
LINE_REGION_NOT_EXIST(500021, "线索的所属大区/分公司未填写", null),
LINE_REGION_NOT_EXIST(500021, "请先补充加盟商所属大区/分公司", null),
POINT_NOT_COMPLETE(600000, "铺位信息未填写完全,请完善后生成评估报告", null),
POINT_NOT_EXIST(600001, "铺位信息不存在", null),

View File

@@ -0,0 +1,31 @@
package com.cool.store.dao;
import com.cool.store.entity.OldShopDO;
import com.cool.store.mapper.OldShopMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: WangShuo
* @Date: 2025/04/12/18:36
* @Version 1.0
* @注释:
*/
@Repository
public class OldShopDAO {
@Resource
private OldShopMapper oldShopMapper;
public List<OldShopDO> getByMobile(String mobile) {
if (StringUtils.isBlank(mobile)){
return null;
}
Example example = new Example(OldShopDO.class);
example.createCriteria().andEqualTo("mobile", mobile);
return oldShopMapper.selectByExample(example);
}
}

View File

@@ -198,9 +198,6 @@ public class ShopInfoDAO {
public List<PlatformBuildListResponse> platformBuildList(List<Long> regionIds, platformBuildListRequest request){
if(CollectionUtils.isEmpty(regionIds)){
return new ArrayList<>();
}
return shopInfoMapper.platformBuildList(regionIds, request);
}

View File

@@ -0,0 +1,14 @@
package com.cool.store.mapper;
import com.cool.store.entity.OldShopDO;
import tk.mybatis.mapper.common.BaseMapper;
import tk.mybatis.mapper.common.Mapper;
/**
* @Author: WangShuo
* @Date: 2025/04/12/18:33
* @Version 1.0
* @注释:
*/
public interface OldShopMapper extends Mapper<OldShopDO> {
}

View File

@@ -82,19 +82,19 @@
booking_user =#{bookingUser},
</if>
<if test="planExitTime !=null">
plan_exit_time =#{planExitTime}
plan_exit_time =#{planExitTime},
</if>
<if test="ksAccount !=null">
ks_account =#{ksAccount}
ks_account =#{ksAccount},
</if>
<if test="verificationMobile !=null">
verification_mobile =#{verificationMobile}
verification_mobile =#{verificationMobile},
</if>
<if test="shopLocationScreenshots !=null">
shop_location_screenshots =#{shopLocationScreenshots}
shop_location_screenshots =#{shopLocationScreenshots},
</if>
<if test="shopDoorwayPhoto !=null">
shop_doorway_photo =#{shopDoorwayPhoto}
shop_doorway_photo =#{shopDoorwayPhoto},
</if>
<if test="shopInteriorPhoto !=null">
shop_interior_photo =#{shopInteriorPhoto}

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!--mybatis-3-mapper.dtd:约束文件的名称限制和检查在当前文件中出现的标签和属性符合mybatis的要求-->
<!--namespace命名空间要有唯一的值要求使用dao接口的权限定名称一个dao接口对应一个mappernamespace指明对应哪个dao接口-->
<mapper namespace="com.cool.store.mapper.OldShopMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.OldShopDO">
<result column="id" property="id" jdbcType="BIGINT"/>
<result column="shop_code" property="shopCode" jdbcType="VARCHAR"/>
<result column="shop_name" property="shopName" jdbcType="VARCHAR"/>
<result column="mobile" property="mobile" jdbcType="VARCHAR"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id, shop_code, shop_name,mobile, create_time, update_time
</sql>
</mapper>

View File

@@ -33,6 +33,7 @@
<result column="province_code" jdbcType="VARCHAR" property="provinceCode"/>
<result column="city_code" jdbcType="VARCHAR" property="cityCode"/>
<result column="district_code" jdbcType="VARCHAR" property="districtCode"/>
<result column="point_location" jdbcType="VARCHAR" property="pointLocation"/>
</resultMap>
<sql id="allColumn">
@@ -41,7 +42,7 @@
development_time, point_status, point_score, select_status, submit_audit_count, point_source, deleted,
create_time, update_time,
province, city, district, township, opportunity_point_code, opportunity_point_name,
province_code, city_code, district_code
province_code, city_code, district_code, point_location
</sql>
<select id="getMyPointData" resultType="com.cool.store.vo.point.PointHomePageDataVO">
@@ -330,7 +331,13 @@
city = #{request.city},
district = #{request.district},
township = #{request.township},
point_score = #{request.pointScore}
point_score = #{request.pointScore},
opportunity_point_code = #{request.opportunityPointCode},
opportunity_point_name = #{request.opportunityPointName},
province_code = #{request.provinceCode},
city_code = #{request.cityCode},
district_code = #{request.districtCode},
point_location = #{request.pointLocation}
where id = #{request.id}
</update>

View File

@@ -126,7 +126,8 @@
p.create_time as createTime,
p.opportunity_point_code as opportunityPointCode,
p.opportunity_point_name as opportunityPointName,
c.picture_obj as pictureObj
c.picture_obj as pictureObj,
pr.status as recommendStatus
from
xfsg_point_recommend pr
inner join xfsg_point_info p on p.id = pr.point_id

View File

@@ -111,7 +111,7 @@
SET
account = #{account},
password = #{password},
status = #{status},
status = #{status}
WHERE
shop_id = #{shopId}
AND system_name = #{systemName}

View File

@@ -222,11 +222,13 @@
xsi.deleted = 0
and xssi.shop_stage = 3
and xssi.shop_sub_stage_status != -100
and
xsi.region_id in
<foreach collection="list" open="(" separator="," close=")" index="index" item="item">
#{item}
</foreach>
<if test="list !=null and list.size >0">
and
xsi.region_id in
<foreach collection="list" open="(" separator="," close=")" index="index" item="item">
#{item}
</foreach>
</if>
<if test="request.shopKeyword != null and request.shopKeyword != ''">
and (xsi.shop_name like concat("%",#{request.shopKeyword},"%") or xsi.shop_code like
concat("%",#{request.shopKeyword},"%"))

View File

@@ -0,0 +1,47 @@
package com.cool.store.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.persistence.*;
import java.util.Date;
@Data
@Table(name = "xfsg_old_shop")
public class OldShopDO {
/**
* 主键ID
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
/**
* 门店编码
*/
@Column(name = "shop_code")
private String shopCode;
@Column(name = "shop_name")
private String shopName;
/**
* 手机号
*/
@Column(name = "mobile")
private String mobile;
/**
* 创建时间
*/
@Column(name = "create_time")
private Date createTime;
/**
* 更新时间
*/
@Column(name = "update_time")
private Date updateTime;
}

View File

@@ -169,4 +169,7 @@ public class PointInfoDO {
@Column(name = "district_code")
private String districtCode;
@Column(name = "point_location")
private String pointLocation;
}

View File

@@ -33,8 +33,8 @@ public class AddBranchShopRequest {
@NotNull
@Min(1)
@Max(3)
@ApiModelProperty(" 加盟模式//'1-社会加盟模式/加盟部加盟店 2-强加盟模式/加盟公司加盟店 3-加盟公司自有店',")
@Max(4)
@ApiModelProperty(" 加盟模式//'1-社会加盟模式/加盟部加盟店 2-强加盟模式/加盟公司加盟店 3-加盟公司自有店',4-强加盟")
private Integer joinMode;
@NotBlank
@ApiModelProperty("'加盟品牌1,\"正新鸡排\"2,\"正新三明治\"3,\"正烧记\"4,\"大鼓米线\"5,\"串小妹\"6,\"茂掌柜\"'")

View File

@@ -85,6 +85,7 @@ public class AddPointDetailRequest {
private String landlordUsername;
@ApiModelProperty("房东电话")
@NotBlank(message = "房东电话不能为空")
private String landlordMobile;
@Min(1)

View File

@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
@@ -17,6 +18,7 @@ import java.util.List;
*/
@Data
public class ThreeAcceptanceRequest {
@NotNull
private Long shopId;
@ApiModelProperty("工程部验收")
private ThreeAcceptanceDTO engineeringAcceptance;

View File

@@ -77,6 +77,7 @@ public class UpdatePointDetailRequest extends AddPointDetailRequest {
result.setProvinceCode(request.getProvinceCode());
result.setCityCode(request.getCityCode());
result.setDistrictCode(request.getDistrictCode());
result.setPointLocation(request.getLocation());
result.setId(request.getPointId());
result.setPointName(request.getPointName());
result.setRegionId(request.getRegionId());

View File

@@ -36,7 +36,7 @@ public class ZxjpApiRequest {
private String fxyAccount;
@ApiModelProperty(value = "新掌柜")
private String xzjAccount;
private String xzgAccount;
@ApiModelProperty(value = "云流水账号")
private String ylsAccount;
@@ -59,9 +59,12 @@ public class ZxjpApiRequest {
@ApiModelProperty(value = "店铺品牌")
private String franchiseBrand;
@ApiModelProperty(value = "新管家对应组织")
@ApiModelProperty(value = "新管家对应组织id")
private String xgjRegionId;
@ApiModelProperty(value = "新管家对应组织")
private String xgjRegionName;
@ApiModelProperty(value = "新管家副总裁")
private String xgjVicePresident;

View File

@@ -18,4 +18,14 @@ public class ThreeSignResponse {
private ThreeAcceptanceDTO operationsAcceptance;
@ApiModelProperty("加盟商验收")
private ThreeAcceptanceDTO partnerAcceptance;
@ApiModelProperty("快手号")
private String ksAccount;
@ApiModelProperty("核销手机号")
private String verificationPhone;
@ApiModelProperty("高德、百度定位截图")
private String shopLocationScreenshots;
@ApiModelProperty("门店门头照片")
private String shopDoorwayPhoto;
@ApiModelProperty("门店内景照片")
private String shopInteriorPhoto;
}

View File

@@ -269,6 +269,18 @@ public class PointDetailVO {
@ApiModelProperty("所属机会点名称")
private String opportunityPointName;
@ApiModelProperty("省编码")
private String provinceCode;
@ApiModelProperty("市编码")
private String cityCode;
@ApiModelProperty("区/县编码")
private String districtCode;
@ApiModelProperty("铺位经纬度geohash")
private String location;
public static PointDetailVO convertVO(PointInfoDO pointInfo, PointDetailInfoDO pointDetailInfo) {
PointDetailVO result = new PointDetailVO();
result.setPointId(pointInfo.getId());
@@ -354,6 +366,10 @@ public class PointDetailVO {
result.setTownship(pointInfo.getTownship());
result.setOpportunityPointCode(pointInfo.getOpportunityPointCode());
result.setOpportunityPointName(pointInfo.getOpportunityPointName());
result.setProvinceCode(pointInfo.getProvinceCode());
result.setCityCode(pointInfo.getCityCode());
result.setDistrictCode(pointInfo.getDistrictCode());
result.setLocation(pointInfo.getPointLocation());
return result;
}

View File

@@ -92,6 +92,8 @@ public class PointPageVO {
pointPageVO.setCreateTime(pointInfo.getCreateTime());
pointPageVO.setUpdateTime(pointInfo.getUpdateTime());
pointPageVO.setOpenShopName(pointInfo.getOpenName());
pointPageVO.setOpportunityPointCode(pointInfo.getOpportunityPointCode());
pointPageVO.setOpportunityPointName(pointInfo.getOpportunityPointName());
resultList.add(pointPageVO);
}
return resultList;

View File

@@ -1,6 +1,7 @@
package com.cool.store.service;
import com.cool.store.entity.WarehouseInfoDO;
import com.github.pagehelper.PageInfo;
import java.util.List;
@@ -12,5 +13,5 @@ import java.util.List;
*/
public interface WarehouseInfoService {
List<WarehouseInfoDO> getAllAndActive(String keyword,Integer pageNum,Integer pageSize);
PageInfo<WarehouseInfoDO> getAllAndActive(String keyword, Integer pageNum, Integer pageSize);
}

View File

@@ -99,7 +99,6 @@ public class DecorationServiceImpl implements DecorationService {
RedisUtilPool redisUtilPool;
@Resource
DecorationDesignInfoDAO decorationDesignInfoDAO;
@Override
public DesignInfoVo DesignInfo(Long shopId) {
return null;
@@ -383,16 +382,18 @@ public class DecorationServiceImpl implements DecorationService {
@Override
public PageInfo<fitmentCheckVO> getFitmentAcceptanceList(AcceptanceListRequest request, LoginUserInfo user) {
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(user.getUserId());
List<Long> regions = new ArrayList<>();
for (String authRegionId : authRegionIds) {
regions.add(Long.parseLong(authRegionId));
if ( !sysRoleService.checkIsAdmin(user.getUserId())){
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(user.getUserId());
for (String authRegionId : authRegionIds) {
regions.add(Long.parseLong(authRegionId));
}
if (regions.isEmpty()) {
log.info("该用户下权限没有管理区域");
return new PageInfo<>();
}
}
PageHelper.startPage(request.getPageNum(), request.getPageSize());
if (regions.isEmpty()) {
log.info("该用户下权限没有管理区域");
return new PageInfo<>();
}
List<fitmentCheckVO> fitmentCheckVOList = new ArrayList<>();
//shopId,lineid,regionid,shopname,storenum,
@@ -746,6 +747,11 @@ public class DecorationServiceImpl implements DecorationService {
ThreeAcceptanceDTO partner = JSONObject.parseObject(acceptanceInfoDO.getPartnerAcceptanceSignatures(), ThreeAcceptanceDTO.class);
threeSignResponse.setPartnerAcceptance(partner);
}
threeSignResponse.setKsAccount(acceptanceInfoDO.getKsAccount());
threeSignResponse.setVerificationPhone(acceptanceInfoDO.getVerificationMobile());
threeSignResponse.setShopLocationScreenshots(acceptanceInfoDO.getShopLocationScreenshots());
threeSignResponse.setShopDoorwayPhoto(acceptanceInfoDO.getShopDoorwayPhoto());
threeSignResponse.setShopInteriorPhoto(acceptanceInfoDO.getShopInteriorPhoto());
return threeSignResponse;
}

View File

@@ -10,6 +10,7 @@ import com.cool.store.mapper.HyOpenAreaInfoMapper;
import com.cool.store.mapper.JoinIntentionMapper;
import com.cool.store.mapper.LineAuditInfoMapper;
import com.cool.store.mapper.LineInfoMapper;
import com.cool.store.request.GetPasswordDTO;
import com.cool.store.request.JoinIntentionRequest;
import com.cool.store.service.JoinIntentionService;
import com.cool.store.service.ThirdXinGuanJiaService;
@@ -37,7 +38,8 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
private EnterpriseUserDAO enterpriseUserDAO;
@Resource
JoinIntentionMapper joinIntentionMapper;
@Resource
ThirdXinGuanJiaService thirdXinGuanJiaService;
@Resource
QualificationsInfoDAO qualificationsInfoDAO;
@@ -64,8 +66,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
CommonService commonService;
@Resource
HyPartnerUserInfoDAO hyPartnerUserInfoDAO;
@Resource
ThirdXinGuanJiaService thirdXinGuanJiaService;
@Override
@Transactional(rollbackFor = Exception.class)
@@ -132,11 +133,12 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
byte[] saltBytes = PasswordUtil.generateSalt();
String salt = PasswordUtil.bytesToHex(saltBytes);
String password = PasswordUtil.encryptPassword(substring, salt);
GetPasswordDTO getPasswordDTO = new GetPasswordDTO();
getPasswordDTO.setPassword(substring);
String downstreamSystemSecondaryPassword = thirdXinGuanJiaService.getPassword(getPasswordDTO);
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(lineInfo.getPartnerId());
hyPartnerUserInfoDO.setDownstreamSystemPassword(password);
hyPartnerUserInfoDO.setDownstreamSystemSecondaryPassword(downstreamSystemSecondaryPassword);
hyPartnerUserInfoDO.setDownstreamSystemSalting(salt);
hyPartnerUserInfoDO.setUpdateTime(new Date());
hyPartnerUserInfoDAO.updatePasswordByPartnerId(hyPartnerUserInfoDO);

View File

@@ -17,11 +17,8 @@ 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.service.OperationLogService;
import com.cool.store.service.PlatformBuildService;
import com.cool.store.service.*;
import com.cool.store.mapper.PlatformBuildMapper;
import com.cool.store.service.RegionService;
import com.cool.store.service.UserAuthMappingService;
import com.cool.store.utils.poi.DateUtils;
import com.cool.store.utils.poi.StringUtils;
import com.cool.store.vo.PartnerUserInfoVO;
@@ -52,6 +49,8 @@ import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
@Service
public class PlatformBuildServiceImpl implements PlatformBuildService {
@Resource
private SysRoleService sysRoleService;
@Resource
private ApplyLicenseMapper applyLicenseMapper;
@Resource
@@ -280,17 +279,21 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
@Override
public PageInfo<PlatformBuildListResponse> platformBuildList(platformBuildListRequest request) {
String userId = request.getOperateUserId();
List<String> regionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(userId);
if (CollectionUtils.isEmpty(regionIds)) {
return new PageInfo<>();
}
List<Long> regionIdList = new ArrayList<>();
for (String regionId : regionIds) {
regionIdList.add(Long.parseLong(regionId));
if (!sysRoleService.checkIsAdmin(userId)) {
List<String> regionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(userId);
if (CollectionUtils.isEmpty(regionIds)) {
return new PageInfo<>();
}
for (String regionId : regionIds) {
regionIdList.add(Long.parseLong(regionId));
}
}
List<Long> subRegionIdsByRegionIdList = regionMapper.getSubRegionIdsByRegionIdList(request.getRegionIds());
if (CollectionUtils.isNotEmpty(subRegionIdsByRegionIdList)) {
request.setRegionIds(subRegionIdsByRegionIdList);
if (CollectionUtils.isNotEmpty(request.getRegionIds())) {
List<Long> subRegionIdsByRegionIdList = regionMapper.getSubRegionIdsByRegionIdList(request.getRegionIds());
if (CollectionUtils.isNotEmpty(subRegionIdsByRegionIdList)) {
request.setRegionIds(subRegionIdsByRegionIdList);
}
}
PageHelper.startPage(request.getPageNum(), request.getPageSize());
List<PlatformBuildListResponse> responses = shopInfoDAO.platformBuildList(regionIdList, request);
@@ -338,20 +341,20 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
platformBuildResponse.setLegalIdCardFront(qualificationsInfoDO.getLegalIdCardFront());
platformBuildResponse.setLegalIdCardBack(qualificationsInfoDO.getLegalIdCardBack());
}
if (Objects.nonNull(pointInfo)){
platformBuildResponse.setShopProvinceCityDistrict(pointInfo.getProvince()+pointInfo.getCity()+pointInfo.getDistrict());
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)){
if (Objects.nonNull(licenseTransactDO)) {
platformBuildResponse.setCreditUrl(licenseTransactDO.getCreditUrl());
//("二证合一标识0否 1 是")
if (licenseTransactDO.getTwoCertificatesOne().equals(1)){
if (licenseTransactDO.getTwoCertificatesOne().equals(1)) {
platformBuildResponse.setFoodBusinessLicenseUrl(licenseTransactDO.getCreditUrl());
}else if (licenseTransactDO.getTwoCertificatesOne().equals(0)){
} else if (licenseTransactDO.getTwoCertificatesOne().equals(0)) {
platformBuildResponse.setFoodBusinessLicenseUrl(licenseTransactDO.getFoodBusinessLicenseUrl());
}
}
@@ -524,7 +527,7 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
List<OperationLogDO> operationLogs = operationLogDAO.getBySubStageStatusEnumAndsStatus(shopId, nowStatus, OperationTypeEnum.OPERATION_TYPE_1.getCode());
operationLogService.batchUpdateProcessed(operationLogs, auditId, request.getOperateUserId(), request.getReason());
//平台账号维护
accountDAO.changeStatus(shopId,platformBuildDO.getType(),request.getAccount(),request.getPassword(),request.getResultType());
accountDAO.changeStatus(shopId, platformBuildDO.getType(), request.getAccount(), request.getPassword(), request.getResultType());
platformBuildDO.setAuditId(auditId);
platformBuildDO.setAccount(request.getAccount());
platformBuildDO.setPassword(request.getPassword());

View File

@@ -107,6 +107,7 @@ public class PointServiceImpl implements PointService {
String userId = user.getUserId();
PointInfoDO pointInfo = AddPointDetailRequest.convertPointDO(shopPointDetailRequest);
pointInfo.setPointCode(generateCode());
pointInfo.setPointLocation(shopPointDetailRequest.getLocation());
pointInfo.setDevelopmentManager(userId);
pointInfo.setDevelopmentTime(new Date());
Long pointId = pointInfoDAO.addPointInfo(pointInfo);
@@ -302,6 +303,9 @@ public class PointServiceImpl implements PointService {
log.error("铺位详细信息不存在");
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
}
if (!checkIsAudit(pointInfo,pointDetailInfo)) {
throw new ServiceException(ErrorCodeEnum.THE_DATA_IS_NOT_FILLED);
}
//处理子任务审核记录表
AuditSettingVO auditSetting = getAuditSetting();
if (Objects.isNull(auditSetting)) {
@@ -328,7 +332,17 @@ public class PointServiceImpl implements PointService {
dealNextAuditRecord(pointInfo, pointAuditRecordMap, NodeNoEnum.NODE_NO_0.getCode());
return pointInfoDAO.updatePointInfo(updatePoint);
}
private Boolean checkIsAudit(PointInfoDO pointInfo,PointDetailInfoDO pointDetailInfoDO){
if (StringUtils.isAnyBlank(pointInfo.getPointArea(),pointInfo.getLatitude(),
pointInfo.getLongitude(),pointInfo.getAddress(),pointInfo.getProvince(),pointInfo.getCity(),
pointInfo.getDistrict(),pointInfo.getTownship(),pointInfo.getOpportunityPointCode(),pointInfo.getOpportunityPointName()
,pointInfo.getProvinceCode(),pointInfo.getCityCode(),pointInfo.getDistrictCode(),pointDetailInfoDO.getMonthRent()
,pointDetailInfoDO.getLandlordMobile())){
return false;
}
return true;
}
@Override
public Integer auditSetting(AuditSettingRequest request) {
String cacheKey = MessageFormat.format(AUDIT_SETTING_KEY, enterpriseId);

View File

@@ -68,7 +68,7 @@ public class ShopAccountServiceImpl implements ShopAccountService {
shopAccountDOS.forEach(x->{
ShopAccountDTO shopAccountDTO = new ShopAccountDTO();
shopAccountDTO.setBoundPhone(x.getBoundPhone());
shopAccountDTO.setShopId(x.getShopId());
shopAccountDTO.setSystemName(x.getSystemName());
shopAccountDTO.setAccount(x.getAccount());

View File

@@ -55,6 +55,9 @@ import static com.cool.store.enums.ErrorCodeEnum.UPDATE_INVESTMENT_MANAGER_FAIL;
@Service
@Slf4j
public class ShopServiceImpl implements ShopService {
@Resource
private OldShopDAO oldShopDAO;
@Value("${mybatis.configuration.variables.enterpriseId}")
private String eid;
@Resource
@@ -578,27 +581,45 @@ public class ShopServiceImpl implements ShopService {
@Override
public ShopResponse getShopNameAndCode(Long shopId, Long lineId) {
boolean flag = false;
MiniShopsResponse shopInfo = shopInfoDAO.currentShopWhetherOpen(shopId,eid);
ShopResponse response = new ShopResponse();
if (Objects.nonNull(shopInfo)&&StringUtils.isNotBlank(shopInfo.getShopCode())) {
ShopNameAndCodeDTO currentShop = new ShopNameAndCodeDTO();
currentShop.setShopName(shopInfo.getShopName());
currentShop.setShopCode(shopInfo.getShopCode());
response.setCurrentShop(currentShop);
flag = true;
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(lineId);
if (lineInfoDO == null){
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
}
ShopResponse response = new ShopResponse();
if (shopId != null) {
MiniShopsResponse shopInfo = shopInfoDAO.currentShopWhetherOpen(shopId, eid);
if (Objects.nonNull(shopInfo) && StringUtils.isNotBlank(shopInfo.getShopCode())) {
ShopNameAndCodeDTO currentShop = new ShopNameAndCodeDTO();
currentShop.setShopName(shopInfo.getShopName());
currentShop.setShopCode(shopInfo.getShopCode());
response.setCurrentShop(currentShop);
flag = true;
}
}
List<MiniShopsResponse> shopList = shopInfoDAO.getShopListSuccessOpen(eid,lineId);
List<ShopNameAndCodeDTO> list = new ArrayList<>();
if (CollectionUtils.isNotEmpty(shopList)) {
for (MiniShopsResponse shopInfoDO : shopList) {
if (lineId != null) {
List<MiniShopsResponse> shopList = shopInfoDAO.getShopListSuccessOpen(eid, lineId);
if (CollectionUtils.isNotEmpty(shopList)) {
for (MiniShopsResponse shopInfoDO : shopList) {
ShopNameAndCodeDTO dto = new ShopNameAndCodeDTO();
dto.setShopName(shopInfoDO.getShopName());
dto.setShopCode(shopInfoDO.getShopCode());
list.add(dto);
}
flag = true;
}
}
List<OldShopDO> oldMobile = oldShopDAO.getByMobile(lineInfoDO.getMobile());
if (CollectionUtils.isNotEmpty(oldMobile)) {
for (OldShopDO oldShopDO : oldMobile) {
ShopNameAndCodeDTO dto = new ShopNameAndCodeDTO();
dto.setShopName(shopInfoDO.getShopName());
dto.setShopCode(shopInfoDO.getShopCode());
dto.setShopName(oldShopDO.getShopName());
dto.setShopCode(oldShopDO.getShopCode());
list.add(dto);
}
response.setShopList(list);
flag = true;
}
response.setShopList(list);
if (flag) {
return response;
} else {

View File

@@ -118,7 +118,7 @@ public class SyncDataServiceImpl implements SyncDataService {
request.setFranchiseBrand(split[0]);
}
request.setFxyAccount(lineInfoDO.getMobile());
request.setXzjAccount(shopInfo.getShopCode());
request.setXzgAccount(shopInfo.getShopCode());
request.setYlsAccount(shopInfo.getShopCode());
request.setWqfAccount(shopInfo.getShopCode());
if (systemType.equals(DownSystemTypeEnum.XGJ)) {
@@ -132,6 +132,7 @@ public class SyncDataServiceImpl implements SyncDataService {
}
if (orderSysInfoDO != null) {
request.setXgjRegionId(orderSysInfoDO.getXgjRegionId());
request.setXgjRegionName(orderSysInfoDO.getXgjRegionName());
request.setXgjVicePresident(orderSysInfoDO.getXgjVicePresident());
request.setAddresseeName(orderSysInfoDO.getAddresseeName());
request.setAddresseeMobile(orderSysInfoDO.getAddresseeMobile());
@@ -150,17 +151,10 @@ public class SyncDataServiceImpl implements SyncDataService {
request.setShopSupervisorUserName(investmentManager);
request.setJoinMode(shopInfo.getJoinMode());
if (acceptanceInfoDO != null) {
if (acceptanceInfoDO.getShopDoorwayPhoto() != null) {
List<String> doorwayPhoto = Arrays.stream(acceptanceInfoDO.getShopDoorwayPhoto().split(","))
.collect(Collectors.toList());
request.setShopDoorwayPhoto(doorwayPhoto);
}
if (acceptanceInfoDO.getShopInteriorPhoto() != null) {
List<String> interiorPhoto = Arrays.stream(acceptanceInfoDO.getShopInteriorPhoto().split(","))
.collect(Collectors.toList());
request.setShopInteriorPhoto(interiorPhoto);
}
request.setShopLocationScreenshots(acceptanceInfoDO.getShopLocationScreenshots());
request.setShopDoorwayPhoto(getUrlList(acceptanceInfoDO.getShopDoorwayPhoto()));
request.setShopInteriorPhoto(getUrlList(acceptanceInfoDO.getShopInteriorPhoto()));
request.setShopLocationScreenshots(getUrl(acceptanceInfoDO.getShopLocationScreenshots()));
request.setVerificationMobile(acceptanceInfoDO.getVerificationMobile());
request.setKsAccount(acceptanceInfoDO.getKsAccount());
}
@@ -232,4 +226,24 @@ public class SyncDataServiceImpl implements SyncDataService {
}
return null;
}
private static List<String> getUrlList(String json) {
if (StringUtils.isBlank(json)) {
return null;
}
try {
// 将 JSON 字符串解析为 JSONArray
List<String> result = new ArrayList<>();
JSONArray jsonArray = JSONArray.parseArray(json);
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonObject = jsonArray.getJSONObject(i);
result.add(jsonObject.getString("url"));
}
return result;
} catch (Exception e) {
log.info("getUrl error:{},JSON:{}", e.getMessage(), json);
}
return null;
}
}

View File

@@ -4,6 +4,7 @@ import com.cool.store.entity.WarehouseInfoDO;
import com.cool.store.mapper.WarehouseInfoMapper;
import com.cool.store.service.WarehouseInfoService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lowagie.text.PageSize;
import org.springframework.stereotype.Service;
@@ -23,8 +24,9 @@ public class WarehouseInfoServiceImpl implements WarehouseInfoService {
@Resource
private WarehouseInfoMapper warehouseInfoMapper;
@Override
public List<WarehouseInfoDO> getAllAndActive(String keyword,Integer pageNum,Integer pageSize) {
public PageInfo<WarehouseInfoDO> getAllAndActive(String keyword,Integer pageNum,Integer pageSize) {
PageHelper.startPage(pageNum,pageSize);
return warehouseInfoMapper.getAllAndActive(keyword);
List<WarehouseInfoDO> allAndActive = warehouseInfoMapper.getAllAndActive(keyword);
return new PageInfo<>(allAndActive);
}
}

View File

@@ -21,6 +21,7 @@ import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -89,7 +90,7 @@ public class PCDecorationController {
}
@ApiOperation("提交三方验收签字")
@PostMapping("/submitThreeAcceptanceSign")
public ResponseResult<Boolean> submitThreeAcceptanceSign(@RequestBody ThreeAcceptanceRequest request){
public ResponseResult<Boolean> submitThreeAcceptanceSign(@RequestBody @Validated ThreeAcceptanceRequest request){
return ResponseResult.success(decorationService.pcSubmitAcceptanceSign(request));
}
@ApiOperation("查看三方验收签字")

View File

@@ -1,6 +1,7 @@
package com.cool.store.controller.webb;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.dto.XgjOrganizationDTO;
import com.cool.store.enums.OrderSysTypeEnum;
import com.cool.store.request.OrderSysInfoRequest;
import com.cool.store.response.ResponseResult;
@@ -12,6 +13,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: WangShuo
@@ -45,7 +47,7 @@ public class PCOrderSysInfoController {
@GetMapping("/getXgjOrganization")
@ApiOperation("获取新管家组织架构")
public ResponseResult<Object> getXgjOrganization(@RequestParam(value = "partnerId", required = true,defaultValue = "0") String partnerId) {
public ResponseResult<List<XgjOrganizationDTO>> getXgjOrganization(@RequestParam(value = "partnerId", required = true,defaultValue = "0") String partnerId) {
return ResponseResult.success(pushService.getXgjOrganization(partnerId));
}

View File

@@ -3,6 +3,7 @@ package com.cool.store.controller.webb;
import com.cool.store.entity.WarehouseInfoDO;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.WarehouseInfoService;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
@@ -29,9 +30,9 @@ public class PCWarehouseInfoController {
@GetMapping("/getAllAndActive")
@ApiOperation(value = "获取正新鸡排仓库配置")
public ResponseResult<List<WarehouseInfoDO>> getAllAndActive(@RequestParam("keyword")String keyword ,
@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,
@RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize) {
public ResponseResult<PageInfo<WarehouseInfoDO>> getAllAndActive(@RequestParam("keyword")String keyword ,
@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,
@RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize) {
return ResponseResult.success(warehouseInfoService.getAllAndActive(keyword,pageNum,pageSize));
}
}

View File

@@ -129,7 +129,7 @@ public class MiniShopController {
@ApiOperation("给bot的门店信息")
@GetMapping("/getShopNameAndCode")
public ResponseResult<ShopResponse> getShopNameAndCode(@RequestParam("shopId")Long shopId, @RequestParam("lineId")Long lineId) {
public ResponseResult<ShopResponse> getShopNameAndCode(@RequestParam(name = "shopId",required = false)Long shopId, @RequestParam("lineId")Long lineId) {
return ResponseResult.success(shopService.getShopNameAndCode(shopId,lineId));
}