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