建店资料同步平台建店

This commit is contained in:
shuo.wang
2025-06-09 15:39:05 +08:00
parent 81083972ca
commit 171f3ca08b
2 changed files with 35 additions and 1 deletions

View File

@@ -3,10 +3,12 @@ package com.cool.store.dao;
import com.cool.store.entity.BuildInformationDO;
import com.cool.store.entity.PlatformBuildDO;
import com.cool.store.mapper.PlatformBuildMapper;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: WangShuo
@@ -42,4 +44,18 @@ public class PlatformBuildDAO {
example.createCriteria().andEqualTo("shopId",shopId).andEqualTo("type",type);
return platformBuildMapper.selectOneByExample(example);
}
public List<PlatformBuildDO> selectByShopId(Long shopId) {
Example example = new Example(PlatformBuildDO.class);
example.createCriteria().andEqualTo("shopId",shopId);
return platformBuildMapper.selectByExample(example);
}
public Boolean batchUpdate(List<PlatformBuildDO> platformBuildDOList) {
if (CollectionUtils.isEmpty(platformBuildDOList)) {
return false;
}
for (PlatformBuildDO platformBuildDO : platformBuildDOList){
platformBuildMapper.updateByPrimaryKeySelective(platformBuildDO);
}
return true;
}
}