Commit 77159ecc by 陶光胜

门店品牌变更

parent f24d406f
......@@ -11,6 +11,7 @@ import com.gic.store.service.StoreBrandService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
......@@ -86,7 +87,7 @@ public class StoreBrandServiceImpl implements StoreBrandService {
List<TabStoreBrandRef> existList = tabStoreBrandRefMapper.selectByEidAndBrandIdList(enterpriseId, storeBrandIdList);
Map<String, Integer> existMap = existList.stream().collect(Collectors.toMap(ref -> ref.getEnterpriseId() + "-" + ref.getStoreBrandId(), TabStoreBrandRef::getId));
for(Integer storeBrandId : storeBrandIdList){
if(!existMap.containsKey(enterpriseId + "-" + storeBrandId)){
if(MapUtils.isNotEmpty(existMap) && !existMap.containsKey(enterpriseId + "-" + storeBrandId)){
continue;
}
TabStoreBrandRef tabStoreBrandRef = new TabStoreBrandRef();
......
......@@ -160,7 +160,7 @@
</update>
<insert id="insertList" parameterType="com.gic.store.entity.TabStoreBrandRef">
insert into tab_store_brand_ref (id, enterprise_id, store_brand_id,
insert into tab_store_brand_ref (enterprise_id, store_brand_id,
type, create_time, update_time,
delete_flag, sort)
values
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment