选址
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: BussinessStateEnum
|
||||
@@ -30,4 +32,16 @@ public enum BussinessStateEnum {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public static BussinessStateEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (BussinessStateEnum bussinessStateEnum : BussinessStateEnum.values()) {
|
||||
if (bussinessStateEnum.getCode().equals(code)) {
|
||||
return bussinessStateEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: CompeteBusinessCapacityEnum
|
||||
@@ -39,5 +41,17 @@ public enum CompeteBusinessCapacityEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static CompeteBusinessCapacityEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (CompeteBusinessCapacityEnum value : CompeteBusinessCapacityEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: CompeteTypeEnum
|
||||
@@ -40,4 +42,16 @@ public enum CompeteTypeEnum {
|
||||
}
|
||||
|
||||
|
||||
public static CompeteTypeEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (CompeteTypeEnum value : CompeteTypeEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: ConsumerAbilityEnum
|
||||
@@ -39,4 +41,16 @@ public enum ConsumerAbilityEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static ConsumerAbilityEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (ConsumerAbilityEnum consumerAbilityEnum : ConsumerAbilityEnum.values()) {
|
||||
if (consumerAbilityEnum.getCode().equals(code)) {
|
||||
return consumerAbilityEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: CoverCommunityEnum
|
||||
@@ -39,4 +41,16 @@ public enum CoverCommunityEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static CoverCommunityEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (CoverCommunityEnum coverCommunityEnum : CoverCommunityEnum.values()) {
|
||||
if (coverCommunityEnum.getCode().equals(code)) {
|
||||
return coverCommunityEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: FlowRateCalculateEnum
|
||||
@@ -39,4 +41,16 @@ public enum FlowRateCalculateEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static FlowRateCalculateEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (FlowRateCalculateEnum value : FlowRateCalculateEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: FlowRateEnum
|
||||
@@ -32,4 +34,16 @@ public enum FlowRateEnum {
|
||||
return desc;
|
||||
}
|
||||
|
||||
|
||||
public static FlowRateEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (FlowRateEnum value : FlowRateEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: FarmerMarketEnum
|
||||
@@ -37,4 +39,16 @@ public enum GatherGuestFarmerMarketEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static GatherGuestFarmerMarketEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (GatherGuestFarmerMarketEnum value : GatherGuestFarmerMarketEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: GatherGuestHospitalEnum
|
||||
@@ -39,4 +41,16 @@ public enum GatherGuestHospitalEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static GatherGuestHospitalEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (GatherGuestHospitalEnum value : GatherGuestHospitalEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: GatherGuestSchoolEnum
|
||||
@@ -39,5 +41,17 @@ public enum GatherGuestSchoolEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static GatherGuestSchoolEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (GatherGuestSchoolEnum value : GatherGuestSchoolEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: IntendPositionEnum
|
||||
@@ -38,4 +40,17 @@ public enum GreenBeltEnum {
|
||||
}
|
||||
|
||||
|
||||
public static GreenBeltEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (GreenBeltEnum value : GreenBeltEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: StoreOutlookEnum
|
||||
@@ -38,5 +40,17 @@ public enum GuestConvenienceEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static GuestConvenienceEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (GuestConvenienceEnum value : GuestConvenienceEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: IntendPositionEnum
|
||||
@@ -39,4 +41,17 @@ public enum IntendPositionEnum {
|
||||
}
|
||||
|
||||
|
||||
public static IntendPositionEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (IntendPositionEnum value : IntendPositionEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: NearBusinessConditionEnum
|
||||
@@ -39,5 +41,16 @@ public enum NearBusinessConditionEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static NearBusinessConditionEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (NearBusinessConditionEnum value : NearBusinessConditionEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: NearCompeteEnum
|
||||
@@ -39,5 +41,16 @@ public enum NearCompeteEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static NearCompeteEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (NearCompeteEnum nearCompeteEnum : NearCompeteEnum.values()) {
|
||||
if (nearCompeteEnum.getCode().equals(code)) {
|
||||
return nearCompeteEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: NearRepastEnum
|
||||
@@ -39,5 +41,18 @@ public enum NearNeighborEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static NearNeighborEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (NearNeighborEnum nearNeighborEnum : NearNeighborEnum.values()) {
|
||||
if (nearNeighborEnum.getCode().equals(code)) {
|
||||
return nearNeighborEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: NearRepastEnum
|
||||
@@ -38,5 +40,16 @@ public enum NearRepastEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static NearRepastEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (NearRepastEnum value : NearRepastEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: PaymentMethodEnum
|
||||
@@ -32,4 +34,17 @@ public enum PaymentMethodEnum {
|
||||
return desc;
|
||||
}
|
||||
|
||||
|
||||
public static PaymentMethodEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (PaymentMethodEnum paymentMethodEnum : PaymentMethodEnum.values()) {
|
||||
if (paymentMethodEnum.getCode().equals(code)) {
|
||||
return paymentMethodEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: PointDirectionEnum
|
||||
@@ -30,4 +32,16 @@ public enum PointDirectionEnum {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public static PointDirectionEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (PointDirectionEnum value : PointDirectionEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: PropertyStatusEnum
|
||||
@@ -32,4 +34,17 @@ public enum PropertyStatusEnum {
|
||||
return desc;
|
||||
}
|
||||
|
||||
|
||||
public static PropertyStatusEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (PropertyStatusEnum propertyStatusEnum : PropertyStatusEnum.values()) {
|
||||
if (propertyStatusEnum.getCode().equals(code)) {
|
||||
return propertyStatusEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: ShopAreaTypeEnum
|
||||
@@ -36,4 +38,17 @@ public enum ShopAreaTypeEnum {
|
||||
return desc;
|
||||
}
|
||||
|
||||
|
||||
public static ShopAreaTypeEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (ShopAreaTypeEnum shopAreaTypeEnum : ShopAreaTypeEnum.values()) {
|
||||
if (shopAreaTypeEnum.getCode().equals(code)) {
|
||||
return shopAreaTypeEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: SiteConditionsEnum
|
||||
@@ -32,4 +34,17 @@ public enum SiteConditionsEnum {
|
||||
return desc;
|
||||
}
|
||||
|
||||
|
||||
public static SiteConditionsEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (SiteConditionsEnum value : SiteConditionsEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: StoreFlowTrendEnum
|
||||
@@ -37,5 +39,16 @@ public enum StoreFlowTrendEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static StoreFlowTrendEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (StoreFlowTrendEnum value : StoreFlowTrendEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: StoreOutlookEnum
|
||||
@@ -38,5 +40,16 @@ public enum StoreOutlookEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static StoreOutlookEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (StoreOutlookEnum value : StoreOutlookEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums.point;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: WantShopSizeEnum
|
||||
@@ -40,5 +42,16 @@ public enum WantShopSizeEnum {
|
||||
return score;
|
||||
}
|
||||
|
||||
public static WantShopSizeEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
return null;
|
||||
}
|
||||
for (WantShopSizeEnum value : WantShopSizeEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,8 +34,14 @@ public class ShopPointDetailInfoDAO {
|
||||
* @return
|
||||
*/
|
||||
public Integer updateShopPointDetailInfo(ShopPointDetailInfoDO shopPointDetailInfo) {
|
||||
Long pointDetailId = getPointDetailIdByPointId(shopPointDetailInfo.getPointId());
|
||||
shopPointDetailInfo.setId(pointDetailId);
|
||||
return shopPointDetailInfoMapper.updateByPrimaryKeySelective(shopPointDetailInfo);
|
||||
}
|
||||
|
||||
public Long getPointDetailIdByPointId(Long pointId){
|
||||
return shopPointDetailInfoMapper.getPointDetailIdByPointId(pointId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.ShopPointInfoDO;
|
||||
import com.cool.store.mapper.ShopPointInfoMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -17,4 +18,12 @@ public class ShopPointInfoDAO {
|
||||
@Resource
|
||||
private ShopPointInfoMapper shopPointInfoMapper;
|
||||
|
||||
public Long addShopPointInfo(ShopPointInfoDO shopPointInfo) {
|
||||
shopPointInfoMapper.insertSelective(shopPointInfo);
|
||||
return shopPointInfo.getId();
|
||||
}
|
||||
|
||||
public Integer updatePointInfo(ShopPointInfoDO shopPointInfo) {
|
||||
return shopPointInfoMapper.updateByPrimaryKeySelective(shopPointInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.ShopPointDetailInfoDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface ShopPointDetailInfoMapper extends Mapper<ShopPointDetailInfoDO> {
|
||||
|
||||
/**
|
||||
* 获取详情id
|
||||
* @param pointId
|
||||
* @return
|
||||
*/
|
||||
Long getPointDetailIdByPointId(@Param("pointId") Long pointId);
|
||||
}
|
||||
@@ -2,9 +2,6 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.ShopPointDetailInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.ShopPointDetailInfoDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="point_id" jdbcType="BIGINT" property="pointId" />
|
||||
<result column="bussiness_status" jdbcType="TINYINT" property="bussinessStatus" />
|
||||
@@ -14,7 +11,6 @@
|
||||
<result column="nineteen_flow_rate" jdbcType="TINYINT" property="nineteenFlowRate" />
|
||||
<result column="point_direction" jdbcType="TINYINT" property="pointDirection" />
|
||||
<result column="site_conditions" jdbcType="TINYINT" property="siteConditions" />
|
||||
<result column="use_area" jdbcType="VARCHAR" property="useArea" />
|
||||
<result column="store_width" jdbcType="VARCHAR" property="storeWidth" />
|
||||
<result column="landlord_username" jdbcType="VARCHAR" property="landlordUsername" />
|
||||
<result column="landlord_mobile" jdbcType="VARCHAR" property="landlordMobile" />
|
||||
@@ -54,20 +50,20 @@
|
||||
<result column="clerk_num" jdbcType="VARCHAR" property="clerkNum" />
|
||||
<result column="clerk_fee" jdbcType="VARCHAR" property="clerkFee" />
|
||||
<result column="bonus" jdbcType="VARCHAR" property="bonus" />
|
||||
<result column="monthly_rent" jdbcType="VARCHAR" property="monthlyRent" />
|
||||
<result column="month_rent" jdbcType="VARCHAR" property="monthRent" />
|
||||
<result column="other_fee" jdbcType="VARCHAR" property="otherFee" />
|
||||
<result column="net_profit" jdbcType="VARCHAR" property="netProfit" />
|
||||
<result column="monthly_rate_return" jdbcType="VARCHAR" property="monthlyRateReturn" />
|
||||
<result column="month_rate_return" jdbcType="VARCHAR" property="monthRateReturn" />
|
||||
<result column="development_manager_sign" jdbcType="VARCHAR" property="developmentManagerSign" />
|
||||
<result column="development_manager_sign_time" jdbcType="TIMESTAMP" property="developmentManagerSignTime" />
|
||||
<result column="operation_user_sign" jdbcType="VARCHAR" property="operationUserSign" />
|
||||
<result column="operation_user_sign_time" jdbcType="TIMESTAMP" property="operationUserSignTime" />
|
||||
<result column="line_sign" jdbcType="VARCHAR" property="lineSign" />
|
||||
<result column="line_sign_time" jdbcType="TIMESTAMP" property="lineSignTime" />
|
||||
<result column="market_size_score" jdbcType="VARCHAR" property="marketSizeScore" />
|
||||
<result column="shop_area_score" jdbcType="VARCHAR" property="shopAreaScore" />
|
||||
<result column="convenient_score" jdbcType="VARCHAR" property="convenientScore" />
|
||||
<result column="environment_score" jdbcType="VARCHAR" property="environmentScore" />
|
||||
<result column="market_size_score" jdbcType="INTEGER" property="marketSizeScore" />
|
||||
<result column="shop_area_score" jdbcType="INTEGER" property="shopAreaScore" />
|
||||
<result column="convenient_score" jdbcType="INTEGER" property="convenientScore" />
|
||||
<result column="environment_score" jdbcType="INTEGER" property="environmentScore" />
|
||||
<result column="rent_contract" jdbcType="VARCHAR" property="rentContract" />
|
||||
<result column="map_evaluation_report" jdbcType="VARCHAR" property="mapEvaluationReport" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
@@ -75,4 +71,7 @@
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="picture_obj" jdbcType="LONGVARCHAR" property="pictureObj" />
|
||||
</resultMap>
|
||||
<select id="getPointDetailIdByPointId" resultType="java.lang.Long">
|
||||
select id from xfsg_shop_point_detail_info where point_id = #{pointId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -2,27 +2,23 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.ShopPointInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.ShopPointInfoDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="point_code" jdbcType="VARCHAR" property="pointCode" />
|
||||
<result column="point_name" jdbcType="VARCHAR" property="pointName" />
|
||||
<result column="region_id" jdbcType="BIGINT" property="regionId" />
|
||||
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||
<result column="line_id" jdbcType="BIGINT" property="lineId" />
|
||||
<result column="point_space" jdbcType="VARCHAR" property="pointSpace" />
|
||||
<result column="point_area" jdbcType="VARCHAR" property="pointArea" />
|
||||
<result column="shop_area_type" jdbcType="VARCHAR" property="shopAreaType" />
|
||||
<result column="longitude" jdbcType="VARCHAR" property="longitude" />
|
||||
<result column="latitude" jdbcType="VARCHAR" property="latitude" />
|
||||
<result column="address" jdbcType="VARCHAR" property="address" />
|
||||
<result column="point_area_id" jdbcType="BIGINT" property="pointAreaId" />
|
||||
<result column="development_manager" jdbcType="VARCHAR" property="developmentManager" />
|
||||
<result column="operate_user_id" jdbcType="VARCHAR" property="operateUserId" />
|
||||
<result column="development_time" jdbcType="TIMESTAMP" property="developmentTime" />
|
||||
<result column="point_status" jdbcType="TINYINT" property="pointStatus" />
|
||||
<result column="point_score" jdbcType="VARCHAR" property="pointScore" />
|
||||
<result column="audit_count" jdbcType="TINYINT" property="auditCount" />
|
||||
<result column="point_score" jdbcType="INTEGER" property="pointScore" />
|
||||
<result column="submit_audit_count" jdbcType="TINYINT" property="submitAuditCount" />
|
||||
<result column="is_line_upload" jdbcType="BIT" property="isLineUpload" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import com.cool.store.enums.point.*;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
import javax.persistence.*;
|
||||
|
||||
@Data
|
||||
@@ -60,12 +63,6 @@ public class ShopPointDetailInfoDO {
|
||||
@Column(name = "site_conditions")
|
||||
private Integer siteConditions;
|
||||
|
||||
/**
|
||||
* 使用面积(一楼)
|
||||
*/
|
||||
@Column(name = "use_area")
|
||||
private String useArea;
|
||||
|
||||
/**
|
||||
* 门店内宽
|
||||
*/
|
||||
@@ -163,7 +160,7 @@ public class ShopPointDetailInfoDO {
|
||||
private Integer nearNeighbor;
|
||||
|
||||
/**
|
||||
* 周边100米内竞争对手 参考NearCompetitorEnum
|
||||
* 周边100米内竞争对手 参考NearCompeteEnum
|
||||
*/
|
||||
@Column(name = "near_compete")
|
||||
private Integer nearCompete;
|
||||
@@ -205,13 +202,13 @@ public class ShopPointDetailInfoDO {
|
||||
private Integer wantShopSize;
|
||||
|
||||
/**
|
||||
* 竞争对手性质 参考CompetitorTypeEnum
|
||||
* 竞争对手性质 参考CompeteTypeEnum
|
||||
*/
|
||||
@Column(name = "compete_type")
|
||||
private Integer competeType;
|
||||
|
||||
/**
|
||||
* 竞争对手经营能力 参考CompetitorBusinessCapacityEnum
|
||||
* 竞争对手经营能力 参考CompeteBusinessCapacityEnum
|
||||
*/
|
||||
@Column(name = "compete_business_capacity")
|
||||
private Integer competeBusinessCapacity;
|
||||
@@ -302,8 +299,8 @@ public class ShopPointDetailInfoDO {
|
||||
/**
|
||||
* 门店月房租
|
||||
*/
|
||||
@Column(name = "monthly_rent")
|
||||
private String monthlyRent;
|
||||
@Column(name = "month_rent")
|
||||
private String monthRent;
|
||||
|
||||
/**
|
||||
* 水电物业及其他
|
||||
@@ -320,8 +317,8 @@ public class ShopPointDetailInfoDO {
|
||||
/**
|
||||
* 月投资回报率
|
||||
*/
|
||||
@Column(name = "monthly_rate_return")
|
||||
private String monthlyRateReturn;
|
||||
@Column(name = "month_rate_return")
|
||||
private String monthRateReturn;
|
||||
|
||||
/**
|
||||
* 拓展专员签名
|
||||
@@ -363,25 +360,25 @@ public class ShopPointDetailInfoDO {
|
||||
* 市场容量评估分数
|
||||
*/
|
||||
@Column(name = "market_size_score")
|
||||
private String marketSizeScore;
|
||||
private Integer marketSizeScore;
|
||||
|
||||
/**
|
||||
* 商圈氛围评估分数
|
||||
*/
|
||||
@Column(name = "shop_area_score")
|
||||
private String shopAreaScore;
|
||||
private Integer shopAreaScore;
|
||||
|
||||
/**
|
||||
* 便利性评估分数
|
||||
*/
|
||||
@Column(name = "convenient_score")
|
||||
private String convenientScore;
|
||||
private Integer convenientScore;
|
||||
|
||||
/**
|
||||
* 门店属性与竞争环境评估分数
|
||||
*/
|
||||
@Column(name = "environment_score")
|
||||
private String environmentScore;
|
||||
private Integer environmentScore;
|
||||
|
||||
/**
|
||||
* 租赁合同
|
||||
@@ -418,4 +415,198 @@ public class ShopPointDetailInfoDO {
|
||||
@Column(name = "picture_obj")
|
||||
private String pictureObj;
|
||||
|
||||
/**
|
||||
* 市场容量评估分数
|
||||
* @return
|
||||
*/
|
||||
public Integer getMarketSizeScore() {
|
||||
Integer score = 0;
|
||||
CoverCommunityEnum coverCommunityEnum = CoverCommunityEnum.getByCode(this.coverCommunity);
|
||||
ConsumerAbilityEnum consumerAbilityEnum = ConsumerAbilityEnum.getByCode(this.consumerAbility);
|
||||
FlowRateCalculateEnum flowRateCalculateEnum = FlowRateCalculateEnum.getByCode(this.flowRateCalculate);
|
||||
if(Objects.nonNull(coverCommunityEnum)){
|
||||
score += coverCommunityEnum.getScore();
|
||||
}
|
||||
if(Objects.nonNull(consumerAbilityEnum)){
|
||||
score += consumerAbilityEnum.getScore();
|
||||
}
|
||||
if(Objects.nonNull(flowRateCalculateEnum)){
|
||||
score += flowRateCalculateEnum.getScore();
|
||||
}
|
||||
return score;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商圈氛围评估分数
|
||||
* @return
|
||||
*/
|
||||
public Integer getShopAreaScore() {
|
||||
GatherGuestFarmerMarketEnum guestFarmerMarketEnum = GatherGuestFarmerMarketEnum.getByCode(this.gatherGuestFarmerMarket);
|
||||
GatherGuestHospitalEnum guestHospitalEnum = GatherGuestHospitalEnum.getByCode(this.gatherGuestHospital);
|
||||
GatherGuestSchoolEnum guestSchoolEnum = GatherGuestSchoolEnum.getByCode(this.gatherGuestSchool);
|
||||
StoreFlowTrendEnum flowTrendEnum = StoreFlowTrendEnum.getByCode(this.storeFlowTrend);
|
||||
NearRepastEnum nearRepastEnum = NearRepastEnum.getByCode(this.nearRepast);
|
||||
NearNeighborEnum neighborEnum = NearNeighborEnum.getByCode(this.nearNeighbor);
|
||||
NearCompeteEnum competeEnum = NearCompeteEnum.getByCode(this.nearCompete);
|
||||
NearBusinessConditionEnum businessConditionEnum = NearBusinessConditionEnum.getByCode(this.nearBusinessCondition);
|
||||
Integer score = 0;
|
||||
if(Objects.nonNull(guestFarmerMarketEnum)){
|
||||
score += guestFarmerMarketEnum.getScore();
|
||||
}
|
||||
if(Objects.nonNull(guestHospitalEnum)){
|
||||
score += guestHospitalEnum.getScore();
|
||||
}
|
||||
if(Objects.nonNull(guestSchoolEnum)){
|
||||
score += guestSchoolEnum.getScore();
|
||||
}
|
||||
if(Objects.nonNull(flowTrendEnum)){
|
||||
score += flowTrendEnum.getScore();
|
||||
}
|
||||
if(Objects.nonNull(nearRepastEnum)){
|
||||
score += nearRepastEnum.getScore();
|
||||
}
|
||||
if(Objects.nonNull(neighborEnum)){
|
||||
score += neighborEnum.getScore();
|
||||
}
|
||||
if(Objects.nonNull(competeEnum)){
|
||||
score += competeEnum.getScore();
|
||||
}
|
||||
if(Objects.nonNull(businessConditionEnum)){
|
||||
score += businessConditionEnum.getScore();
|
||||
}
|
||||
return score;
|
||||
}
|
||||
|
||||
/**
|
||||
* 便利性评估分数
|
||||
* @return
|
||||
*/
|
||||
public Integer getConvenientScore() {
|
||||
IntendPositionEnum positionEnum = IntendPositionEnum.getByCode(this.intendPosition);
|
||||
GreenBeltEnum greenBeltEnum = GreenBeltEnum.getByCode(this.greenBelt);
|
||||
StoreOutlookEnum outlookEnum = StoreOutlookEnum.getByCode(this.storeOutlook);
|
||||
GuestConvenienceEnum convenienceEnum = GuestConvenienceEnum.getByCode(this.guestConvenience);
|
||||
Integer score = 0;
|
||||
if(Objects.nonNull(positionEnum)){
|
||||
score += positionEnum.getScore();
|
||||
}
|
||||
if(Objects.nonNull(greenBeltEnum)){
|
||||
score += greenBeltEnum.getScore();
|
||||
}
|
||||
if(Objects.nonNull(outlookEnum)){
|
||||
score += outlookEnum.getScore();
|
||||
}
|
||||
if(Objects.nonNull(convenienceEnum)){
|
||||
score += convenienceEnum.getScore();
|
||||
}
|
||||
return score;
|
||||
}
|
||||
|
||||
/**
|
||||
* 门店属性与竞争环境评估分数
|
||||
* @return
|
||||
*/
|
||||
public Integer getEnvironmentScore() {
|
||||
WantShopSizeEnum shopSizeEnum = WantShopSizeEnum.getByCode(this.wantShopSize);
|
||||
CompeteTypeEnum competeTypeEnum = CompeteTypeEnum.getByCode(this.competeType);
|
||||
CompeteBusinessCapacityEnum businessCapacityEnum = CompeteBusinessCapacityEnum.getByCode(this.competeBusinessCapacity);
|
||||
Integer score = 0;
|
||||
if(Objects.nonNull(shopSizeEnum)){
|
||||
score += shopSizeEnum.getScore();
|
||||
}
|
||||
if(Objects.nonNull(competeTypeEnum)){
|
||||
score += competeTypeEnum.getScore();
|
||||
}
|
||||
if(Objects.nonNull(businessCapacityEnum)){
|
||||
score += businessCapacityEnum.getScore();
|
||||
}
|
||||
return score;
|
||||
}
|
||||
|
||||
public Integer getTotalPointScore(){
|
||||
return getMarketSizeScore() + getShopAreaScore() + getConvenientScore() + getEnvironmentScore();
|
||||
}
|
||||
|
||||
public boolean isCanSubmitEvaluable(){
|
||||
if(Objects.isNull(this.bussinessStatus)){
|
||||
return false;
|
||||
}
|
||||
Integer nullCount = 0;
|
||||
if(Objects.isNull(this.nineFlowRate)){
|
||||
nullCount++;
|
||||
}
|
||||
if(Objects.isNull(this.tenFlowRate)){
|
||||
nullCount++;
|
||||
}
|
||||
if(Objects.isNull(this.eighteenFlowRate)){
|
||||
nullCount++;
|
||||
}
|
||||
if(Objects.isNull(this.nineteenFlowRate)){
|
||||
nullCount++;
|
||||
}
|
||||
if(nullCount > 2){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.pointDirection) || Objects.isNull(this.siteConditions) || Objects.isNull(this.storeWidth)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.landlordUsername) || StringUtils.isBlank(this.landlordUsername.trim()) || Objects.isNull(this.landlordMobile) || StringUtils.isBlank(this.landlordMobile.trim())){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.storeRent)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.paymentMethod) || Objects.isNull(this.propertyStatus)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.transferFee)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.coverCommunity) || Objects.isNull(this.consumerAbility) || Objects.isNull(this.flowRateCalculate)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.gatherGuestFarmerMarket) || Objects.isNull(this.gatherGuestHospital) || Objects.isNull(this.gatherGuestSchool)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.storeFlowTrend)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.nearRepast) || Objects.isNull(this.nearNeighbor) || Objects.isNull(this.nearCompete) || Objects.isNull(this.nearBusinessCondition)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.intendPosition) || Objects.isNull(this.greenBelt) || Objects.isNull(this.storeOutlook) || Objects.isNull(this.guestConvenience)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.wantShopSize) || Objects.isNull(this.competeType) || Objects.isNull(this.competeBusinessCapacity) || Objects.isNull(this.investAmount)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.dayTrader) || Objects.isNull(this.profitRate) || Objects.isNull(this.monthProfitRate)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.deliveryRate) || Objects.isNull(this.deliveryFee)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.brandUseFee) || Objects.isNull(this.brandUseRate)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.staffFee)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.shopManagerFee) || Objects.isNull(this.shopManagerNum)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.clerkFee) || Objects.isNull(this.clerkNum)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.bonus) || Objects.isNull(this.monthRent) ||Objects.isNull(this.otherFee)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.netProfit) || Objects.isNull(this.monthRateReturn)){
|
||||
return false;
|
||||
}
|
||||
if(Objects.isNull(this.pictureObj) || StringUtils.isBlank(this.pictureObj)){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -45,8 +45,8 @@ public class ShopPointInfoDO {
|
||||
/**
|
||||
* 点位面积
|
||||
*/
|
||||
@Column(name = "point_space")
|
||||
private String pointSpace;
|
||||
@Column(name = "point_area")
|
||||
private String pointArea;
|
||||
|
||||
/**
|
||||
* 商圈类型
|
||||
@@ -69,12 +69,6 @@ public class ShopPointInfoDO {
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 区域id
|
||||
*/
|
||||
@Column(name = "point_area_id")
|
||||
private Long pointAreaId;
|
||||
|
||||
/**
|
||||
* 拓展专员
|
||||
*/
|
||||
@@ -103,13 +97,13 @@ public class ShopPointInfoDO {
|
||||
* 铺位得分
|
||||
*/
|
||||
@Column(name = "point_score")
|
||||
private String pointScore;
|
||||
private Integer pointScore;
|
||||
|
||||
/**
|
||||
* 审批次数
|
||||
*/
|
||||
@Column(name = "audit_count")
|
||||
private Integer auditCount;
|
||||
@Column(name = "submit_audit_count")
|
||||
private Integer submitAuditCount;
|
||||
|
||||
/**
|
||||
* 是否是加盟商上传
|
||||
|
||||
@@ -0,0 +1,304 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.entity.ShopPointDetailInfoDO;
|
||||
import com.cool.store.entity.ShopPointInfoDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
|
||||
@Data
|
||||
public class AddShopPointDetailRequest {
|
||||
|
||||
@ApiModelProperty("铺位名称")
|
||||
private String pointName;
|
||||
|
||||
@ApiModelProperty("所属大区")
|
||||
private Long regionId;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty("详细地址")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty("经营状况")
|
||||
private Integer bussinessStatus;
|
||||
|
||||
@ApiModelProperty("09:00-10:00人流量")
|
||||
private Integer nineFlowRate;
|
||||
|
||||
@ApiModelProperty("10:00-11:00人流量")
|
||||
private Integer tenFlowRate;
|
||||
|
||||
@ApiModelProperty("18:00-19:00人流量")
|
||||
private Integer eighteenFlowRate;
|
||||
|
||||
@ApiModelProperty("19:00-20:00人流量")
|
||||
private Integer nineteenFlowRate;
|
||||
|
||||
@Min(1)
|
||||
@Max(2)
|
||||
@ApiModelProperty("店铺方位 1主要路线, 2次要路线")
|
||||
private Integer pointDirection;
|
||||
|
||||
@Min(1)
|
||||
@Max(4)
|
||||
@ApiModelProperty("立地条件1.单门面 2.双门面 3.多门面 4.转角")
|
||||
private Integer siteConditions;
|
||||
|
||||
@ApiModelProperty("使用面积(一楼)")
|
||||
private String pointArea;
|
||||
|
||||
@ApiModelProperty("门店内宽")
|
||||
private String storeWidth;
|
||||
|
||||
@ApiModelProperty("房东姓名")
|
||||
private String landlordUsername;
|
||||
|
||||
@ApiModelProperty("房东电话")
|
||||
private String landlordMobile;
|
||||
|
||||
@ApiModelProperty("门店月租金")
|
||||
private String storeRent;
|
||||
|
||||
@Min(1)
|
||||
@Max(4)
|
||||
@ApiModelProperty("支付方式 1.月付 2.季付 3.半年付 4.年付")
|
||||
private Integer paymentMethod;
|
||||
|
||||
@Min(1)
|
||||
@Max(4)
|
||||
@ApiModelProperty("物业状态 1.原始房东 2.二房东 3.三房东 4.招投标性质")
|
||||
private Integer propertyStatus;
|
||||
|
||||
@ApiModelProperty("转让费")
|
||||
private String transferFee;
|
||||
|
||||
@Min(1)
|
||||
@Max(4)
|
||||
@ApiModelProperty("覆盖社区 1.800户以下 2.800-1200户 3.1200-2000户 4.2000户以上")
|
||||
private Integer coverCommunity;
|
||||
|
||||
@Min(1)
|
||||
@Max(4)
|
||||
@ApiModelProperty("消费能力 1.高端 2.中高端 3.中端 4.低端")
|
||||
private Integer consumerAbility;
|
||||
|
||||
@Min(1)
|
||||
@Max(4)
|
||||
@ApiModelProperty("人流测算 1.>400人/时以上, 2.300~400人/时, 3.200~300人/时, 4.100~200人/时")
|
||||
private Integer flowRateCalculate;
|
||||
|
||||
@Min(1)
|
||||
@Max(2)
|
||||
@ApiModelProperty("聚客点农贸市场 1.是 2.否")
|
||||
private Integer gatherGuestFarmerMarket;
|
||||
|
||||
@Min(1)
|
||||
@Max(4)
|
||||
@ApiModelProperty("聚客点医院 1.甲等医院 2.市级医院 3.县区级医院 4.无医院")
|
||||
private Integer gatherGuestHospital;
|
||||
|
||||
@Min(1)
|
||||
@Max(4)
|
||||
@ApiModelProperty("聚客点学校 1.幼儿园/小学 2.大学/学院 3.初中/高中 4.无学校")
|
||||
private Integer gatherGuestSchool;
|
||||
|
||||
@Min(1)
|
||||
@Max(2)
|
||||
@ApiModelProperty("门店人流动向 1.主要流动路线 2.次要流动路线")
|
||||
private Integer storeFlowTrend;
|
||||
|
||||
@Min(1)
|
||||
@Max(3)
|
||||
@ApiModelProperty("周边100米内餐饮 1.餐饮连锁店或6家以上餐饮店 2.普通餐饮店 3.无餐饮店")
|
||||
private Integer nearRepast;
|
||||
|
||||
@Min(1)
|
||||
@Max(4)
|
||||
@ApiModelProperty("周边100米内小业态邻居 1.小业态品牌店3家以上 2.小业态普通店3家以上 3.普通小业态店3家以下 4.无小业态店")
|
||||
private Integer nearNeighbor;
|
||||
|
||||
@Min(1)
|
||||
@Max(4)
|
||||
@ApiModelProperty("周边100米内竞争对手 1.品牌水果店2家以上 2.品牌水果店1家及以上 3.夫妻水果店1家及以上 4.无水果店")
|
||||
private Integer nearCompete;
|
||||
|
||||
@Min(1)
|
||||
@Max(3)
|
||||
@ApiModelProperty("周边100米内业态经营情况 1.运营状况良好 2.运营状况一般 3.运营状况差")
|
||||
private Integer nearBusinessCondition;
|
||||
|
||||
@Min(1)
|
||||
@Max(3)
|
||||
@ApiModelProperty("所处位置 1.十字路口 2.居民生活中心 3.社区出入口")
|
||||
private Integer intendPosition;
|
||||
|
||||
@Min(1)
|
||||
@Max(2)
|
||||
@ApiModelProperty("绿化带 1.门口无绿化带阻挡 2.门口有绿化带阻挡")
|
||||
private Integer greenBelt;
|
||||
|
||||
@Min(1)
|
||||
@Max(3)
|
||||
@ApiModelProperty("门店观瞻 1.观赡非常好 2.观赡一般 3.观赡差")
|
||||
private Integer storeOutlook;
|
||||
|
||||
@Min(1)
|
||||
@Max(3)
|
||||
@ApiModelProperty("门店来客便利性 1.门口5米有人行横道 2.门口15米有人行横道 3.无人行横道")
|
||||
private Integer guestConvenience;
|
||||
|
||||
@Min(1)
|
||||
@Max(5)
|
||||
@ApiModelProperty("意向门店开间尺寸 1.转角 2.12米以上 3.8-12米 4.4-8米 5.4米以下")
|
||||
private Integer wantShopSize;
|
||||
|
||||
@Min(1)
|
||||
@Max(4)
|
||||
@ApiModelProperty("竞争对手性质 1.连锁店 2.强势单店 3.经营散户 4.小型摊贩")
|
||||
private Integer competeType;
|
||||
|
||||
@Min(1)
|
||||
@Max(4)
|
||||
@ApiModelProperty("竞争对手经营能力 1.非常好 2.好 3.一般 4.差")
|
||||
private Integer competeBusinessCapacity;
|
||||
|
||||
@ApiModelProperty("投资总额")
|
||||
private String investAmount;
|
||||
|
||||
@ApiModelProperty("预估日商")
|
||||
private String dayTrader;
|
||||
|
||||
@ApiModelProperty("理论毛利率")
|
||||
private String profitRate;
|
||||
|
||||
@ApiModelProperty("门店月毛利率")
|
||||
private String monthProfitRate;
|
||||
|
||||
@ApiModelProperty("配送费率")
|
||||
private String deliveryRate;
|
||||
|
||||
@ApiModelProperty("配送费")
|
||||
private String deliveryFee;
|
||||
|
||||
@ApiModelProperty("品牌使用费率")
|
||||
private String brandUseRate;
|
||||
|
||||
@ApiModelProperty("品牌使用费")
|
||||
private String brandUseFee;
|
||||
|
||||
@ApiModelProperty("基本人工费用")
|
||||
private String staffFee;
|
||||
|
||||
@ApiModelProperty("店长数量")
|
||||
private String shopManagerNum;
|
||||
|
||||
@ApiModelProperty("店长费用")
|
||||
private String shopManagerFee;
|
||||
|
||||
@ApiModelProperty("店员数量")
|
||||
private String clerkNum;
|
||||
|
||||
@ApiModelProperty("店员费用")
|
||||
private String clerkFee;
|
||||
|
||||
@ApiModelProperty("奖金分红")
|
||||
private String bonus;
|
||||
|
||||
@ApiModelProperty("门店月房租")
|
||||
private String monthRent;
|
||||
|
||||
@ApiModelProperty("水电物业及其他")
|
||||
private String otherFee;
|
||||
|
||||
@ApiModelProperty("净利润")
|
||||
private String netProfit;
|
||||
|
||||
@ApiModelProperty("月投资回报率")
|
||||
private String monthRateReturn;
|
||||
|
||||
@ApiModelProperty("租赁合同")
|
||||
private String rentContract;
|
||||
|
||||
@ApiModelProperty("高德地图评估报告")
|
||||
private String mapEvaluationReport;
|
||||
|
||||
@ApiModelProperty("图片对象")
|
||||
private String pictureObj;
|
||||
|
||||
|
||||
public static ShopPointDetailInfoDO convertDO(AddShopPointDetailRequest request) {
|
||||
ShopPointDetailInfoDO result = new ShopPointDetailInfoDO();
|
||||
result.setBussinessStatus(request.getBussinessStatus());
|
||||
result.setNineFlowRate(request.getNineFlowRate());
|
||||
result.setEighteenFlowRate(request.getEighteenFlowRate());
|
||||
result.setNineteenFlowRate(request.getNineteenFlowRate());
|
||||
result.setPointDirection(request.getPointDirection());
|
||||
result.setSiteConditions(request.getSiteConditions());
|
||||
result.setStoreWidth(request.getStoreWidth());
|
||||
result.setLandlordUsername(request.getLandlordUsername());
|
||||
result.setLandlordMobile(request.getLandlordMobile());
|
||||
result.setStoreRent(request.getStoreRent());
|
||||
result.setPaymentMethod(request.getPaymentMethod());
|
||||
result.setPropertyStatus(request.getPropertyStatus());
|
||||
result.setTransferFee(request.getTransferFee());
|
||||
result.setCoverCommunity(request.getCoverCommunity());
|
||||
result.setConsumerAbility(request.getConsumerAbility());
|
||||
result.setFlowRateCalculate(request.getFlowRateCalculate());
|
||||
result.setGatherGuestFarmerMarket(request.getGatherGuestFarmerMarket());
|
||||
result.setGatherGuestHospital(request.getGatherGuestHospital());
|
||||
result.setGatherGuestSchool(request.getGatherGuestSchool());
|
||||
result.setStoreFlowTrend(request.getStoreFlowTrend());
|
||||
result.setNearRepast(request.getNearRepast());
|
||||
result.setNearNeighbor(request.getNearNeighbor());
|
||||
result.setNearCompete(request.getNearCompete());
|
||||
result.setNearBusinessCondition(request.getNearBusinessCondition());
|
||||
result.setIntendPosition(request.getIntendPosition());
|
||||
result.setGreenBelt(request.getGreenBelt());
|
||||
result.setStoreOutlook(request.getStoreOutlook());
|
||||
result.setGuestConvenience(request.getGuestConvenience());
|
||||
result.setWantShopSize(request.getWantShopSize());
|
||||
result.setCompeteType(request.getCompeteType());
|
||||
result.setCompeteBusinessCapacity(request.getCompeteBusinessCapacity());
|
||||
result.setInvestAmount(request.getInvestAmount());
|
||||
result.setDayTrader(request.getDayTrader());
|
||||
result.setProfitRate(request.getProfitRate());
|
||||
result.setMonthProfitRate(request.getMonthProfitRate());
|
||||
result.setDeliveryRate(request.getDeliveryRate());
|
||||
result.setDeliveryFee(request.getDeliveryFee());
|
||||
result.setBrandUseRate(request.getBrandUseRate());
|
||||
result.setBrandUseFee(request.getBrandUseFee());
|
||||
result.setStaffFee(request.getStaffFee());
|
||||
result.setShopManagerNum(request.getShopManagerNum());
|
||||
result.setShopManagerFee(request.getShopManagerFee());
|
||||
result.setClerkNum(request.getClerkNum());
|
||||
result.setClerkFee(request.getClerkFee());
|
||||
result.setBonus(request.getBonus());
|
||||
result.setMonthRent(request.getMonthRent());
|
||||
result.setOtherFee(request.getOtherFee());
|
||||
result.setNetProfit(request.getNetProfit());
|
||||
result.setMonthRateReturn(request.getMonthRateReturn());
|
||||
result.setRentContract(request.getRentContract());
|
||||
result.setMapEvaluationReport(request.getMapEvaluationReport());
|
||||
result.setPictureObj(request.getPictureObj());
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ShopPointInfoDO convertPointDO(AddShopPointDetailRequest request) {
|
||||
ShopPointInfoDO result = new ShopPointInfoDO();
|
||||
result.setPointName(request.getPointName());
|
||||
result.setRegionId(request.getRegionId());
|
||||
result.setPointArea(request.getPointArea());
|
||||
result.setLatitude(request.getLatitude());
|
||||
result.setLongitude(request.getLongitude());
|
||||
result.setAddress(request.getAddress());
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.entity.ShopPointDetailInfoDO;
|
||||
import com.cool.store.entity.ShopPointInfoDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class UpdateShopPointDetailRequest extends AddShopPointDetailRequest{
|
||||
|
||||
@ApiModelProperty("点位id")
|
||||
private Long pointId;
|
||||
|
||||
|
||||
|
||||
public static ShopPointDetailInfoDO convertDO(UpdateShopPointDetailRequest request) {
|
||||
ShopPointDetailInfoDO result = new ShopPointDetailInfoDO();
|
||||
result.setPointId(request.getPointId());
|
||||
result.setBussinessStatus(request.getBussinessStatus());
|
||||
result.setNineFlowRate(request.getNineFlowRate());
|
||||
result.setTenFlowRate(request.getTenFlowRate());
|
||||
result.setEighteenFlowRate(request.getEighteenFlowRate());
|
||||
result.setNineteenFlowRate(request.getNineteenFlowRate());
|
||||
result.setPointDirection(request.getPointDirection());
|
||||
result.setSiteConditions(request.getSiteConditions());
|
||||
result.setStoreWidth(request.getStoreWidth());
|
||||
result.setLandlordUsername(request.getLandlordUsername());
|
||||
result.setLandlordMobile(request.getLandlordMobile());
|
||||
result.setStoreRent(request.getStoreRent());
|
||||
result.setPaymentMethod(request.getPaymentMethod());
|
||||
result.setPropertyStatus(request.getPropertyStatus());
|
||||
result.setTransferFee(request.getTransferFee());
|
||||
result.setCoverCommunity(request.getCoverCommunity());
|
||||
result.setConsumerAbility(request.getConsumerAbility());
|
||||
result.setFlowRateCalculate(request.getFlowRateCalculate());
|
||||
result.setGatherGuestFarmerMarket(request.getGatherGuestFarmerMarket());
|
||||
result.setGatherGuestHospital(request.getGatherGuestHospital());
|
||||
result.setGatherGuestSchool(request.getGatherGuestSchool());
|
||||
result.setStoreFlowTrend(request.getStoreFlowTrend());
|
||||
result.setNearRepast(request.getNearRepast());
|
||||
result.setNearNeighbor(request.getNearNeighbor());
|
||||
result.setNearCompete(request.getNearCompete());
|
||||
result.setNearBusinessCondition(request.getNearBusinessCondition());
|
||||
result.setIntendPosition(request.getIntendPosition());
|
||||
result.setGreenBelt(request.getGreenBelt());
|
||||
result.setStoreOutlook(request.getStoreOutlook());
|
||||
result.setGuestConvenience(request.getGuestConvenience());
|
||||
result.setWantShopSize(request.getWantShopSize());
|
||||
result.setCompeteType(request.getCompeteType());
|
||||
result.setCompeteBusinessCapacity(request.getCompeteBusinessCapacity());
|
||||
result.setInvestAmount(request.getInvestAmount());
|
||||
result.setDayTrader(request.getDayTrader());
|
||||
result.setProfitRate(request.getProfitRate());
|
||||
result.setMonthProfitRate(request.getMonthProfitRate());
|
||||
result.setDeliveryRate(request.getDeliveryRate());
|
||||
result.setDeliveryFee(request.getDeliveryFee());
|
||||
result.setBrandUseRate(request.getBrandUseRate());
|
||||
result.setBrandUseFee(request.getBrandUseFee());
|
||||
result.setStaffFee(request.getStaffFee());
|
||||
result.setShopManagerNum(request.getShopManagerNum());
|
||||
result.setShopManagerFee(request.getShopManagerFee());
|
||||
result.setClerkNum(request.getClerkNum());
|
||||
result.setClerkFee(request.getClerkFee());
|
||||
result.setBonus(request.getBonus());
|
||||
result.setMonthRent(request.getMonthRent());
|
||||
result.setOtherFee(request.getOtherFee());
|
||||
result.setNetProfit(request.getNetProfit());
|
||||
result.setMonthRateReturn(request.getMonthRateReturn());
|
||||
result.setRentContract(request.getRentContract());
|
||||
result.setMapEvaluationReport(request.getMapEvaluationReport());
|
||||
result.setPictureObj(request.getPictureObj());
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ShopPointInfoDO convertPointDO(UpdateShopPointDetailRequest request) {
|
||||
ShopPointInfoDO result = new ShopPointInfoDO();
|
||||
result.setId(request.getPointId());
|
||||
result.setPointName(request.getPointName());
|
||||
result.setRegionId(request.getRegionId());
|
||||
result.setPointArea(request.getPointArea());
|
||||
result.setLatitude(request.getLatitude());
|
||||
result.setLongitude(request.getLongitude());
|
||||
result.setAddress(request.getAddress());
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,16 +1,28 @@
|
||||
package com.cool.store.request;
|
||||
package com.cool.store.vo.point;
|
||||
|
||||
import com.cool.store.entity.ShopPointDetailInfoDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class ShopPointDetailRequest {
|
||||
public class ShopPointDetailVO {
|
||||
|
||||
@ApiModelProperty("点位id")
|
||||
private Long pointId;
|
||||
@ApiModelProperty("铺位名称")
|
||||
private String pointName;
|
||||
|
||||
@ApiModelProperty("所属大区")
|
||||
private Long regionId;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty("详细地址")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty("经营状况")
|
||||
private Integer bussinessStatus;
|
||||
@@ -34,7 +46,7 @@ public class ShopPointDetailRequest {
|
||||
private Integer siteConditions;
|
||||
|
||||
@ApiModelProperty("使用面积(一楼)")
|
||||
private String useArea;
|
||||
private String pointArea;
|
||||
|
||||
@ApiModelProperty("门店内宽")
|
||||
private String storeWidth;
|
||||
@@ -154,8 +166,7 @@ public class ShopPointDetailRequest {
|
||||
private String bonus;
|
||||
|
||||
@ApiModelProperty("门店月房租")
|
||||
@Column(name = "monthly_rent")
|
||||
private String monthlyRent;
|
||||
private String monthRent;
|
||||
|
||||
@ApiModelProperty("水电物业及其他")
|
||||
private String otherFee;
|
||||
@@ -164,7 +175,7 @@ public class ShopPointDetailRequest {
|
||||
private String netProfit;
|
||||
|
||||
@ApiModelProperty("月投资回报率")
|
||||
private String monthlyRateReturn;
|
||||
private String monthRateReturn;
|
||||
|
||||
@ApiModelProperty("拓展专员签名")
|
||||
private String developmentManagerSign;
|
||||
@@ -185,16 +196,16 @@ public class ShopPointDetailRequest {
|
||||
private Date lineSignTime;
|
||||
|
||||
@ApiModelProperty("市场容量评估分数")
|
||||
private String marketSizeScore;
|
||||
private Integer marketSizeScore;
|
||||
|
||||
@ApiModelProperty("商圈氛围评估分数")
|
||||
private String shopAreaScore;
|
||||
private Integer shopAreaScore;
|
||||
|
||||
@ApiModelProperty("便利性评估分数")
|
||||
private String convenientScore;
|
||||
private Integer convenientScore;
|
||||
|
||||
@ApiModelProperty("门店属性与竞争环境评估分数")
|
||||
private String environmentScore;
|
||||
private Integer environmentScore;
|
||||
|
||||
@ApiModelProperty("租赁合同")
|
||||
private String rentContract;
|
||||
@@ -202,16 +213,76 @@ public class ShopPointDetailRequest {
|
||||
@ApiModelProperty("高德地图评估报告")
|
||||
private String mapEvaluationReport;
|
||||
|
||||
@ApiModelProperty("删除标识")
|
||||
private Boolean deleted;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("图片对象")
|
||||
private String pictureObj;
|
||||
|
||||
|
||||
public static ShopPointDetailInfoDO convertDO(ShopPointDetailVO request) {
|
||||
ShopPointDetailInfoDO result = new ShopPointDetailInfoDO();
|
||||
result.setBussinessStatus(request.getBussinessStatus());
|
||||
result.setNineFlowRate(request.getNineFlowRate());
|
||||
result.setTenFlowRate(request.getTenFlowRate());
|
||||
result.setEighteenFlowRate(request.getEighteenFlowRate());
|
||||
result.setNineteenFlowRate(request.getNineteenFlowRate());
|
||||
result.setPointDirection(request.getPointDirection());
|
||||
result.setSiteConditions(request.getSiteConditions());
|
||||
result.setStoreWidth(request.getStoreWidth());
|
||||
result.setLandlordUsername(request.getLandlordUsername());
|
||||
result.setLandlordMobile(request.getLandlordMobile());
|
||||
result.setStoreRent(request.getStoreRent());
|
||||
result.setPaymentMethod(request.getPaymentMethod());
|
||||
result.setPropertyStatus(request.getPropertyStatus());
|
||||
result.setTransferFee(request.getTransferFee());
|
||||
result.setCoverCommunity(request.getCoverCommunity());
|
||||
result.setConsumerAbility(request.getConsumerAbility());
|
||||
result.setFlowRateCalculate(request.getFlowRateCalculate());
|
||||
result.setGatherGuestFarmerMarket(request.getGatherGuestFarmerMarket());
|
||||
result.setGatherGuestHospital(request.getGatherGuestHospital());
|
||||
result.setGatherGuestSchool(request.getGatherGuestSchool());
|
||||
result.setStoreFlowTrend(request.getStoreFlowTrend());
|
||||
result.setNearRepast(request.getNearRepast());
|
||||
result.setNearNeighbor(request.getNearNeighbor());
|
||||
result.setNearCompete(request.getNearCompete());
|
||||
result.setNearBusinessCondition(request.getNearBusinessCondition());
|
||||
result.setIntendPosition(request.getIntendPosition());
|
||||
result.setGreenBelt(request.getGreenBelt());
|
||||
result.setStoreOutlook(request.getStoreOutlook());
|
||||
result.setGuestConvenience(request.getGuestConvenience());
|
||||
result.setWantShopSize(request.getWantShopSize());
|
||||
result.setCompeteType(request.getCompeteType());
|
||||
result.setCompeteBusinessCapacity(request.getCompeteBusinessCapacity());
|
||||
result.setInvestAmount(request.getInvestAmount());
|
||||
result.setDayTrader(request.getDayTrader());
|
||||
result.setProfitRate(request.getProfitRate());
|
||||
result.setMonthProfitRate(request.getMonthProfitRate());
|
||||
result.setDeliveryRate(request.getDeliveryRate());
|
||||
result.setDeliveryFee(request.getDeliveryFee());
|
||||
result.setBrandUseRate(request.getBrandUseRate());
|
||||
result.setBrandUseFee(request.getBrandUseFee());
|
||||
result.setStaffFee(request.getStaffFee());
|
||||
result.setShopManagerNum(request.getShopManagerNum());
|
||||
result.setShopManagerFee(request.getShopManagerFee());
|
||||
result.setClerkNum(request.getClerkNum());
|
||||
result.setClerkFee(request.getClerkFee());
|
||||
result.setBonus(request.getBonus());
|
||||
result.setMonthRent(request.getMonthRent());
|
||||
result.setOtherFee(request.getOtherFee());
|
||||
result.setNetProfit(request.getNetProfit());
|
||||
result.setMonthRateReturn(request.getMonthRateReturn());
|
||||
result.setDevelopmentManagerSign(request.getDevelopmentManagerSign());
|
||||
result.setDevelopmentManagerSignTime(request.getDevelopmentManagerSignTime());
|
||||
result.setOperationUserSign(request.getOperationUserSign());
|
||||
result.setOperationUserSignTime(request.getOperationUserSignTime());
|
||||
result.setLineSign(request.getLineSign());
|
||||
result.setLineSignTime(request.getLineSignTime());
|
||||
result.setMarketSizeScore(request.getMarketSizeScore());
|
||||
result.setShopAreaScore(request.getShopAreaScore());
|
||||
result.setConvenientScore(request.getConvenientScore());
|
||||
result.setEnvironmentScore(request.getEnvironmentScore());
|
||||
result.setRentContract(request.getRentContract());
|
||||
result.setMapEvaluationReport(request.getMapEvaluationReport());
|
||||
result.setPictureObj(request.getPictureObj());
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.AddShopPointDetailRequest;
|
||||
import com.cool.store.request.UpdateShopPointDetailRequest;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: ShopPointService
|
||||
* @Description:
|
||||
* @date 2024-03-29 15:25
|
||||
*/
|
||||
public interface ShopPointService {
|
||||
|
||||
/**
|
||||
* 新增铺位
|
||||
* @param shopPointDetailRequest
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Long addShopPointDetailInfo(AddShopPointDetailRequest shopPointDetailRequest, String userId);
|
||||
|
||||
/**
|
||||
* 更新铺位
|
||||
* @param shopPointDetailRequest
|
||||
* @return
|
||||
*/
|
||||
Integer updateShopPointDetailInfo(UpdateShopPointDetailRequest shopPointDetailRequest);
|
||||
}
|
||||
@@ -167,7 +167,7 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
||||
log.info("当前线索所处阶段不允许修改面审时间");
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
||||
}
|
||||
if(WorkflowSubStageStatusEnum.isModifyAppointmentTime(lineInfo.getWorkflowSubStageStatus())){
|
||||
if(!WorkflowSubStageStatusEnum.isModifyAppointmentTime(lineInfo.getWorkflowSubStageStatus())){
|
||||
log.info("当前线索所处子状态不允许修改面审时间");
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.dao.LineInfoDAO;
|
||||
import com.cool.store.dao.ShopInfoDAO;
|
||||
import com.cool.store.dao.ShopPointDetailInfoDAO;
|
||||
import com.cool.store.dao.ShopPointInfoDAO;
|
||||
import com.cool.store.entity.ShopPointDetailInfoDO;
|
||||
import com.cool.store.entity.ShopPointInfoDO;
|
||||
import com.cool.store.request.AddShopPointDetailRequest;
|
||||
import com.cool.store.request.UpdateShopPointDetailRequest;
|
||||
import com.cool.store.service.ShopPointService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: ShopPointServiceImpl
|
||||
* @Description:
|
||||
* @date 2024-03-29 15:25
|
||||
*/
|
||||
@Service
|
||||
public class ShopPointServiceImpl implements ShopPointService {
|
||||
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private ShopPointInfoDAO shopPointInfoDAO;
|
||||
@Resource
|
||||
private ShopPointDetailInfoDAO shopPointDetailInfoDAO;
|
||||
@Resource
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
|
||||
@Override
|
||||
public Long addShopPointDetailInfo(AddShopPointDetailRequest shopPointDetailRequest, String userId) {
|
||||
ShopPointInfoDO shopPointInfo = AddShopPointDetailRequest.convertPointDO(shopPointDetailRequest);
|
||||
shopPointInfo.setPointCode(generateCode());
|
||||
shopPointInfo.setDevelopmentManager(userId);
|
||||
Long pointId = shopPointInfoDAO.addShopPointInfo(shopPointInfo);
|
||||
ShopPointDetailInfoDO shopPoint = AddShopPointDetailRequest.convertDO(shopPointDetailRequest);
|
||||
shopPoint.setPointId(pointId);
|
||||
return shopPointDetailInfoDAO.addShopPointDetailInfo(shopPoint);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer updateShopPointDetailInfo(UpdateShopPointDetailRequest shopPointDetailRequest) {
|
||||
ShopPointInfoDO shopPointInfo = UpdateShopPointDetailRequest.convertPointDO(shopPointDetailRequest);
|
||||
ShopPointDetailInfoDO shopPoint = UpdateShopPointDetailRequest.convertDO(shopPointDetailRequest);
|
||||
Long pointDetailId = shopPointDetailInfoDAO.getPointDetailIdByPointId(shopPointDetailRequest.getPointId());
|
||||
shopPoint.setId(pointDetailId);
|
||||
shopPointInfo.setPointScore(shopPoint.getTotalPointScore());
|
||||
shopPointInfoDAO.updatePointInfo(shopPointInfo);
|
||||
return shopPointDetailInfoDAO.updateShopPointDetailInfo(shopPoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成code
|
||||
* @return
|
||||
*/
|
||||
private String generateCode() {
|
||||
// 获取当前时间戳,格式化为YYYYMMddHHmmssSSS
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
String timestampStr = now.format(DateTimeFormatter.ofPattern("yyMMddHHmmssSSS"));
|
||||
// 组合成订单编号,这里假设订单编号格式为:时间戳-序列号
|
||||
return timestampStr;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.request.AddShopPointDetailRequest;
|
||||
import com.cool.store.request.UpdateShopPointDetailRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.ShopPointService;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: ShopPointController
|
||||
* @Description:
|
||||
* @date 2024-03-29 15:36
|
||||
*/
|
||||
@Api(tags = "铺位")
|
||||
@RestController
|
||||
@RequestMapping("/pc/point")
|
||||
public class ShopPointController {
|
||||
|
||||
@Resource
|
||||
private ShopPointService shopPointService;
|
||||
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> addShopPointDetailInfo(@RequestBody AddShopPointDetailRequest shopPointDetailRequest) {
|
||||
return ResponseResult.success(shopPointService.addShopPointDetailInfo(shopPointDetailRequest, CurrentUserHolder.getUserId()));
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
public ResponseResult<Integer> updateShopPointDetailInfo(@RequestBody UpdateShopPointDetailRequest shopPointDetailRequest) {
|
||||
return ResponseResult.success(shopPointService.updateShopPointDetailInfo(shopPointDetailRequest));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user