优化数据处理接口

This commit is contained in:
shuo.wang
2025-06-09 13:26:28 +08:00
parent 06fc2affdc
commit 248d6c8367
8 changed files with 97 additions and 16 deletions

View File

@@ -1,10 +1,12 @@
package com.cool.store.dao;
import com.cool.store.dto.FranchiseFeeStageDateDTO;
import com.cool.store.entity.FranchiseFeeDO;
import com.cool.store.mapper.FranchiseFeeMapper;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.List;
@@ -33,4 +35,11 @@ public class FranchiseFeeDAO {
}
return franchiseFeeMapper.batchUpdateXgjCollectionStatus(shopIds,collectionStatus);
}
public Integer batchUpdateXgjCollectionStatusAndXgjFeesPaid( List<FranchiseFeeStageDateDTO> franchiseFeeStageDateDTOList){
if (CollectionUtils.isEmpty(franchiseFeeStageDateDTOList)){
return 0;
}
return franchiseFeeMapper.batchUpdateXgjCollectionStatusAndXgjFeesPaid(franchiseFeeStageDateDTOList);
}
}

View File

@@ -1,6 +1,7 @@
package com.cool.store.mapper;
import com.cool.store.dto.FranchiseFeeDTO;
import com.cool.store.dto.FranchiseFeeStageDateDTO;
import com.cool.store.entity.FranchiseFeeDO;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
@@ -26,4 +27,6 @@ public interface FranchiseFeeMapper extends Mapper<FranchiseFeeDO> {
Integer updateBill(@Param("list") List<FranchiseFeeDO> list);
Integer batchUpdateXgjCollectionStatus(@Param("shopIds")List<Long> shopId, @Param("collectionStatus")Integer collectionStatus);
Integer batchUpdateXgjCollectionStatusAndXgjFeesPaid( @Param("list") List<FranchiseFeeStageDateDTO> franchiseFeeStageDateDTOList);
}

View File

@@ -40,6 +40,14 @@
#{shopId}
</foreach>
</update>
<update id="batchUpdateXgjCollectionStatusAndXgjFeesPaid">
<foreach collection="list" separator=";" item="item">
update xfsg_franchise_fee
set xgj_collection_status = #{item.xgjCollectionStatus},
xgj_fees_paid = #{item.xgjFeesPaid}
where shop_id = #{item.shopId}
</foreach>
</update>
<select id="selectByShopId" resultType="com.cool.store.entity.FranchiseFeeDO">
select *