Merge branch 'master' into cc_20250218_V2.5.1
This commit is contained in:
@@ -14,4 +14,6 @@ public interface FranchiseFeeMapper extends Mapper<FranchiseFeeDO> {
|
|||||||
FranchiseFeeDO selectByShopId(@Param("shopId") Long shopId);
|
FranchiseFeeDO selectByShopId(@Param("shopId") Long shopId);
|
||||||
|
|
||||||
List<FranchiseFeeDTO> getPayTimeByShopIds(@Param("shopIds") List<Long> shopIds);
|
List<FranchiseFeeDTO> getPayTimeByShopIds(@Param("shopIds") List<Long> shopIds);
|
||||||
|
Integer updateDataHandleServiceV25();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.cool.store.mapper.FranchiseFeeMapper">
|
<mapper namespace="com.cool.store.mapper.FranchiseFeeMapper">
|
||||||
|
<update id="updateDataHandleServiceV25">
|
||||||
|
update xfsg_franchise_fee
|
||||||
|
set first_year_fee = "6000",
|
||||||
|
first_year_manage_fee = "7200"
|
||||||
|
</update>
|
||||||
|
|
||||||
<select id="selectByShopId" resultType="com.cool.store.entity.FranchiseFeeDO">
|
<select id="selectByShopId" resultType="com.cool.store.entity.FranchiseFeeDO">
|
||||||
select *
|
select *
|
||||||
|
|||||||
@@ -33,13 +33,14 @@
|
|||||||
<sql id="allColumn">
|
<sql id="allColumn">
|
||||||
id
|
id
|
||||||
, region_id, line_id, partner_id, point_id, shop_name,
|
, region_id, line_id, partner_id, point_id, shop_name,
|
||||||
shop_code, store_num, shop_manager_user_id, supervisor_user_id,
|
shop_code, store_num, shop_manager_user_id, supervisor_user_id,
|
||||||
plan_open_time, cur_progress, shop_type, shop_stage, deleted, create_time, update_time,
|
plan_open_time, cur_progress, shop_type, shop_stage, deleted, create_time, update_time,
|
||||||
join_mode,detail_address,franchise_brand,development_manager,want_shop_area_id,investment_manager,shop_status,create_user_id,update_user_id
|
join_mode,detail_address,franchise_brand,development_manager,want_shop_area_id,investment_manager,shop_status,create_user_id,update_user_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||||
insert into xfsg_shop_info(region_id, line_id, partner_id, shop_name, store_num,supervisor_user_id,create_time,join_mode,franchise_brand,
|
insert into xfsg_shop_info(region_id, line_id, partner_id, shop_name,
|
||||||
|
store_num,supervisor_user_id,create_time,join_mode,franchise_brand,
|
||||||
development_manager,want_shop_area_id,investment_manager) values
|
development_manager,want_shop_area_id,investment_manager) values
|
||||||
<foreach collection="shopInfoList" item="shop" separator=",">
|
<foreach collection="shopInfoList" item="shop" separator=",">
|
||||||
(#{shop.regionId}, #{shop.lineId}, #{shop.partnerId}, #{shop.shopName},
|
(#{shop.regionId}, #{shop.lineId}, #{shop.partnerId}, #{shop.shopName},
|
||||||
@@ -62,11 +63,11 @@
|
|||||||
|
|
||||||
<select id="getStageShopCount" resultType="com.cool.store.vo.shop.StageShopCountVO">
|
<select id="getStageShopCount" resultType="com.cool.store.vo.shop.StageShopCountVO">
|
||||||
select sum(if(shop_stage = 1, 1, 0)) as selectPointCount,
|
select sum(if(shop_stage = 1, 1, 0)) as selectPointCount,
|
||||||
sum(if(shop_stage = 2, 1, 0)) as buildShopCount,
|
sum(if(shop_stage = 2, 1, 0)) as buildShopCount,
|
||||||
sum(if(shop_stage = 3, 1, 0)) as openShopCount
|
sum(if(shop_stage = 3, 1, 0)) as openShopCount
|
||||||
from xfsg_shop_info
|
from xfsg_shop_info
|
||||||
where deleted = '0'
|
where deleted = '0'
|
||||||
and line_id = #{lineId}
|
and line_id = #{lineId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="unbindPoint">
|
<update id="unbindPoint">
|
||||||
@@ -163,7 +164,7 @@
|
|||||||
<select id="getRegionIdByid" resultType="java.lang.Long">
|
<select id="getRegionIdByid" resultType="java.lang.Long">
|
||||||
select r.parent_id
|
select r.parent_id
|
||||||
from xfsg_shop_info xsi
|
from xfsg_shop_info xsi
|
||||||
join region_${enterpriseId} r on r.id = xsi.region_id
|
join region_${enterpriseId} r on r.id = xsi.region_id
|
||||||
where xsi.id = #{shopId}
|
where xsi.id = #{shopId}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByStoreNum" resultType="com.cool.store.entity.ShopInfoDO">
|
<select id="selectByStoreNum" resultType="com.cool.store.entity.ShopInfoDO">
|
||||||
@@ -345,32 +346,39 @@
|
|||||||
select
|
select
|
||||||
<include refid="allColumn"/>
|
<include refid="allColumn"/>
|
||||||
from xfsg_shop_info where line_id = #{lineId} and deleted= '0'
|
from xfsg_shop_info where line_id = #{lineId} and deleted= '0'
|
||||||
|
and ( 1=1
|
||||||
|
<if test="userId!=null and userId!=''">
|
||||||
|
or investment_manager = #{userId}
|
||||||
|
</if>
|
||||||
<if test="list!=null and list.size>0">
|
<if test="list!=null and list.size>0">
|
||||||
and region_id in
|
or region_id in
|
||||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
)
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getShopPointListByDevelopmentManager" resultType="com.cool.store.dto.point.ShopPointDTO">
|
<select id="getShopPointListByDevelopmentManager" resultType="com.cool.store.dto.point.ShopPointDTO">
|
||||||
select
|
select
|
||||||
a.id as shopId,
|
a.id as shopId,
|
||||||
a.point_id as pointId,
|
a.point_id as pointId,
|
||||||
a.shop_name as shopName,
|
a.shop_name as shopName,
|
||||||
a.want_shop_area_id as wantShopAreaId,
|
a.want_shop_area_id as wantShopAreaId,
|
||||||
b.user_portrait as userPortrait,
|
b.user_portrait as userPortrait,
|
||||||
b.id as lineId,
|
b.id as lineId,
|
||||||
b.username as userName,
|
b.username as userName,
|
||||||
b.mobile as mobile,
|
b.mobile as mobile,
|
||||||
b.investment_manager as investmentManager
|
b.investment_manager as investmentManager
|
||||||
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
|
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
|
||||||
where a.deleted = 0 and a.development_manager = #{request.developmentManager} and shop_status in (0, 1) and point_id is null
|
where a.deleted = 0 and a.development_manager = #{request.developmentManager} and shop_status in (0, 1) and
|
||||||
<if test="request.keyword != null and request.keyword!=''">
|
point_id is null
|
||||||
and (b.username like concat('%', #{request.keyword}, '%') or b.mobile like concat('%', #{request.keyword}, '%'))
|
<if test="request.keyword != null and request.keyword!=''">
|
||||||
</if>
|
and (b.username like concat('%', #{request.keyword}, '%') or b.mobile like concat('%', #{request.keyword},
|
||||||
</select>
|
'%'))
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectAllDataOrByLineId" resultMap="BaseResultMap">
|
<select id="selectAllDataOrByLineId" resultMap="BaseResultMap">
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ public class FranchiseFeeDO {
|
|||||||
private Date firstYearEndTime;
|
private Date firstYearEndTime;
|
||||||
@Column(name = "first_year_fee")
|
@Column(name = "first_year_fee")
|
||||||
private String firstYearFee;
|
private String firstYearFee;
|
||||||
|
@Column(name = "first_year_manage_fee")
|
||||||
|
private String firstYearManageFee;
|
||||||
@Column(name = "second_year_start_time")
|
@Column(name = "second_year_start_time")
|
||||||
private Date secondYearStartTime;
|
private Date secondYearStartTime;
|
||||||
@Column(name = "second_year_end_time")
|
@Column(name = "second_year_end_time")
|
||||||
|
|||||||
@@ -23,8 +23,10 @@ public class FranchiseFeeRequest {
|
|||||||
private Date firstYearStartTime;
|
private Date firstYearStartTime;
|
||||||
@ApiModelProperty("第一年度结束时间")
|
@ApiModelProperty("第一年度结束时间")
|
||||||
private Date firstYearEndTime;
|
private Date firstYearEndTime;
|
||||||
@ApiModelProperty("第一年度加盟费")
|
@ApiModelProperty("第一年度品牌使用费")
|
||||||
private String firstYearFee;
|
private String firstYearFee;
|
||||||
|
@ApiModelProperty("第一年度管理费")
|
||||||
|
private String firstYearManageFee;
|
||||||
@ApiModelProperty("第二年度开始时间")
|
@ApiModelProperty("第二年度开始时间")
|
||||||
private Date secondYearStartTime;
|
private Date secondYearStartTime;
|
||||||
@ApiModelProperty("第二年度结束时间")
|
@ApiModelProperty("第二年度结束时间")
|
||||||
@@ -50,6 +52,7 @@ public class FranchiseFeeRequest {
|
|||||||
franchiseFeeDO.setFirstYearStartTime(this.firstYearStartTime);
|
franchiseFeeDO.setFirstYearStartTime(this.firstYearStartTime);
|
||||||
franchiseFeeDO.setFirstYearEndTime(this.firstYearEndTime);
|
franchiseFeeDO.setFirstYearEndTime(this.firstYearEndTime);
|
||||||
franchiseFeeDO.setFirstYearFee(this.firstYearFee);
|
franchiseFeeDO.setFirstYearFee(this.firstYearFee);
|
||||||
|
franchiseFeeDO.setFirstYearManageFee(this.firstYearManageFee);
|
||||||
franchiseFeeDO.setSecondYearStartTime(this.secondYearStartTime);
|
franchiseFeeDO.setSecondYearStartTime(this.secondYearStartTime);
|
||||||
franchiseFeeDO.setSecondYearEndTime(this.secondYearEndTime);
|
franchiseFeeDO.setSecondYearEndTime(this.secondYearEndTime);
|
||||||
franchiseFeeDO.setSecondYearFee(this.secondYearFee);
|
franchiseFeeDO.setSecondYearFee(this.secondYearFee);
|
||||||
|
|||||||
@@ -23,8 +23,10 @@ public class FranchiseFeeResponse {
|
|||||||
private Date firstYearStartTime;
|
private Date firstYearStartTime;
|
||||||
@ApiModelProperty("第一年度结束时间")
|
@ApiModelProperty("第一年度结束时间")
|
||||||
private Date firstYearEndTime;
|
private Date firstYearEndTime;
|
||||||
@ApiModelProperty("第一年度加盟费")
|
@ApiModelProperty("第一年度品牌使用费")
|
||||||
private String firstYearFee;
|
private String firstYearFee;
|
||||||
|
@ApiModelProperty("第一年度管理费")
|
||||||
|
private String firstYearManageFee;
|
||||||
@ApiModelProperty("第二年度开始时间")
|
@ApiModelProperty("第二年度开始时间")
|
||||||
private Date secondYearStartTime;
|
private Date secondYearStartTime;
|
||||||
@ApiModelProperty("第二年度结束时间")
|
@ApiModelProperty("第二年度结束时间")
|
||||||
@@ -171,6 +173,7 @@ public class FranchiseFeeResponse {
|
|||||||
franchiseFeeResponse.setPerformanceBond(franchiseFeeDO.getPerformanceBond());
|
franchiseFeeResponse.setPerformanceBond(franchiseFeeDO.getPerformanceBond());
|
||||||
franchiseFeeResponse.setCreateTime(franchiseFeeDO.getCreateTime());
|
franchiseFeeResponse.setCreateTime(franchiseFeeDO.getCreateTime());
|
||||||
franchiseFeeResponse.setUpdateTime(franchiseFeeDO.getUpdateTime());
|
franchiseFeeResponse.setUpdateTime(franchiseFeeDO.getUpdateTime());
|
||||||
|
franchiseFeeResponse.setFirstYearManageFee(franchiseFeeDO.getFirstYearManageFee());
|
||||||
return franchiseFeeResponse;
|
return franchiseFeeResponse;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,11 @@ public interface DataHandleService {
|
|||||||
*/
|
*/
|
||||||
Boolean dataHandleService(Long shopId);
|
Boolean dataHandleService(Long shopId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* v2.5 数据处理
|
||||||
|
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer dataHandleServiceV25();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.cool.store.entity.ShopStageInfoDO;
|
|||||||
import com.cool.store.enums.point.ShopStageEnum;
|
import com.cool.store.enums.point.ShopStageEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
|
import com.cool.store.mapper.FranchiseFeeMapper;
|
||||||
import com.cool.store.service.DataHandleService;
|
import com.cool.store.service.DataHandleService;
|
||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
@@ -34,7 +35,8 @@ public class DataHandleServiceImpl implements DataHandleService {
|
|||||||
ShopInfoDAO shopInfoDAO;
|
ShopInfoDAO shopInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
ShopStageInfoDAO shopStageInfoDAO;
|
ShopStageInfoDAO shopStageInfoDAO;
|
||||||
|
@Resource
|
||||||
|
FranchiseFeeMapper franchiseFeeMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -76,6 +78,12 @@ public class DataHandleServiceImpl implements DataHandleService {
|
|||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer dataHandleServiceV25() {
|
||||||
|
return franchiseFeeMapper.updateDataHandleServiceV25();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void licenseHandle(ShopStageInfoDO shopStageInfoDO){
|
public void licenseHandle(ShopStageInfoDO shopStageInfoDO){
|
||||||
if (Objects.isNull(shopStageInfoDO)){
|
if (Objects.isNull(shopStageInfoDO)){
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
|||||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(linePayDO.getLineId());
|
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(linePayDO.getLineId());
|
||||||
linePayResult.setPartnerName(lineInfoDO.getUsername());
|
linePayResult.setPartnerName(lineInfoDO.getUsername());
|
||||||
}
|
}
|
||||||
linePayResult.setAmount(new BigInteger(result.getPerformanceBond()).add(new BigInteger(result.getFirstYearFee()))
|
linePayResult.setAmount(new BigInteger(result.getPerformanceBond()).add(new BigInteger(result.getFirstYearFee())).add(new BigInteger(result.getFirstYearManageFee()))
|
||||||
.add(new BigInteger(result.getYearFranchiseFee())).add(new BigInteger(result.getLoanMargin())).toString());
|
.add(new BigInteger(result.getYearFranchiseFee())).add(new BigInteger(result.getLoanMargin())).toString());
|
||||||
if (Objects.nonNull(result.getAuditId())) {
|
if (Objects.nonNull(result.getAuditId())) {
|
||||||
ShopAuditInfoDO shopAuditInfoDO = shopAuditInfoMapper.selectByPrimaryKey(result.getAuditId());
|
ShopAuditInfoDO shopAuditInfoDO = shopAuditInfoMapper.selectByPrimaryKey(result.getAuditId());
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ public class PosAndOrderInfoServiceImpl implements PosAndOrderInfoService {
|
|||||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
}
|
}
|
||||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_244);
|
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_244);
|
||||||
|
preparationService.updateShopStatus(shopId);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,6 +95,10 @@ public class PCTestController {
|
|||||||
return ResponseResult.success(dataHandleService.dataHandleService(shopId));
|
return ResponseResult.success(dataHandleService.dataHandleService(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/dataHandleServiceV25")
|
||||||
|
public ResponseResult<Integer> dataHandleServiceV25(){
|
||||||
|
return ResponseResult.success(dataHandleService.dataHandleServiceV25());
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/licenseSync")
|
@GetMapping("/licenseSync")
|
||||||
public ResponseResult<Boolean> licenseSync(){
|
public ResponseResult<Boolean> licenseSync(){
|
||||||
|
|||||||
Reference in New Issue
Block a user