流程数据

This commit is contained in:
苏竹红
2024-04-23 10:35:35 +08:00
parent 3dd6e5b6cb
commit 73e6bad7d5
7 changed files with 180 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
package com.cool.store.dao;
import com.cool.store.entity.OpenAcceptanceInfoDO;
import com.cool.store.mapper.OpenAcceptanceInfoMapper;
import com.cool.store.request.OpenAcceptanceRequest;
import com.cool.store.vo.OpenAcceptanceInfoListVO;
@@ -23,5 +24,9 @@ public class OpenAcceptanceInfoDAO {
return openAcceptanceInfoMapper.openAcceptanceList(openAcceptanceRequest);
}
public int insertSelective(OpenAcceptanceInfoDO openAcceptanceInfoDO){
return openAcceptanceInfoMapper.insertSelective(openAcceptanceInfoDO);
}
}

View File

@@ -10,6 +10,7 @@ import com.cool.store.vo.shop.RentInfoToDoVO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.google.common.collect.Lists;
import io.swagger.models.auth.In;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository;
@@ -64,6 +65,13 @@ public class ShopStageInfoDAO {
return shopStageInfoMapper.batchInsert(addShopStageList);
}
public Integer batchUpdate(List<ShopStageInfoDO> shopStageList) {
if(CollectionUtils.isEmpty(shopStageList)){
return 0;
}
return shopStageInfoMapper.batchUpdate(shopStageList);
}
/**
* 获取店铺阶段信息
* @param shopId
@@ -76,6 +84,13 @@ public class ShopStageInfoDAO {
return shopStageInfoMapper.getShopStageInfo(shopId, shopStage);
}
public Integer getAllCompletionCount(Long shopId) {
if(Objects.isNull(shopId)){
return 0;
}
return shopStageInfoMapper.getAllCompletionCount(shopId);
}
/**
* 获取子阶段信息
* @param shopId

View File

@@ -17,6 +17,13 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
*/
Integer batchInsert(@Param("addShopStageList") List<ShopStageInfoDO> addShopStageList);
/**
* 批量修改
* @param addShopStageList
* @return
*/
Integer batchUpdate(@Param("addShopStageList") List<ShopStageInfoDO> addShopStageList);
/**
* 获取店铺阶段信息
* @param shopId
@@ -26,14 +33,21 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
List<ShopStageInfoDO> getShopStageInfo(@Param("shopId") Long shopId, @Param("shopStage") Integer shopStage);
/**
* 跟新店铺阶段信息
* 查询结束阶段的数量
* @param shopId
* @param shopSubStage
* @param shopSubStageStatus
* @param isTerminated
* @param remark
* @return
*/
Integer getAllCompletionCount(@Param("shopId") Long shopId);
/**
* 跟新店铺阶段信息
* @param shopId
* @param shopSubStage
* @param shopSubStageStatus
* @param isTerminated
* @param remark
* @return
*/
Integer updateShopStageInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);

View File

@@ -29,6 +29,23 @@
</foreach>
</insert>
<update id="batchUpdate">
update xfsg_shop_stage_info
<set>
shop_sub_stage_status = CASE id
<foreach collection="addShopStageList" separator=" " item="item">
WHEN #{item.id} THEN IFNULL(#{item.shopSubStageStatus},shop_sub_stage_status)
</foreach>
END
</set>
where id in (
<foreach collection="addShopStageList" item="item" separator=",">
#{item.id}
</foreach>
)
</update>
<select id="getShopStageInfo" resultMap="BaseResultMap">
select
<include refid="allColumn"/>
@@ -41,6 +58,22 @@
</if>
</select>
<select id="getAllCompletionCount" resultMap="BaseResultMap">
select
<include refid="allColumn"/>
from
xfsg_shop_stage_info
where
shop_id = #{shopId} and deleted = 0
and
(( shop_sub_stage = 60 AND shop_sub_stage_status = 610 )
OR ( shop_sub_stage = 40 AND shop_sub_stage_status = 430 )
OR ( shop_sub_stage = 120 AND shop_sub_stage_status = 1230 )
OR ( shop_sub_stage = 130 AND shop_sub_stage_status = 1320 )
OR ( shop_sub_stage = 140 AND shop_sub_stage_status = 1410 )
OR ( shop_sub_stage = 150 AND shop_sub_stage_status = 1510 ))
</select>
<update id="updateShopStageInfo">
update
xfsg_shop_stage_info