|
|
|
@ -16,11 +16,13 @@
|
|
|
|
|
*/ |
|
|
|
|
package com.logpm.basicdata.service.impl; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataStoreContactEntity; |
|
|
|
|
import com.logpm.basicdata.vo.BasicdataStoreContactVO; |
|
|
|
|
import com.logpm.basicdata.excel.BasicdataStoreContactExcel; |
|
|
|
|
import com.logpm.basicdata.mapper.BasicdataStoreContactMapper; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataStoreContactService; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
@ -34,6 +36,7 @@ import java.util.List;
|
|
|
|
|
* @since 2023-05-16 |
|
|
|
|
*/ |
|
|
|
|
@Service |
|
|
|
|
@Slf4j |
|
|
|
|
public class BasicdataStoreContactServiceImpl extends BaseServiceImpl<BasicdataStoreContactMapper, BasicdataStoreContactEntity> implements IBasicdataStoreContactService { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -51,4 +54,26 @@ public class BasicdataStoreContactServiceImpl extends BaseServiceImpl<BasicdataS
|
|
|
|
|
return basicdataStoreContactList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Boolean ownUpdateById(BasicdataStoreContactEntity basicdataStoreContact) { |
|
|
|
|
try{ |
|
|
|
|
List<BasicdataStoreContactEntity> storeContactEntities = baseMapper.selectList(Wrappers.<BasicdataStoreContactEntity>query().lambda() |
|
|
|
|
.eq(BasicdataStoreContactEntity::getShopId, basicdataStoreContact.getShopId()) |
|
|
|
|
); |
|
|
|
|
storeContactEntities.forEach( i ->{ |
|
|
|
|
if(i.getShopId().equals(basicdataStoreContact.getShopId())){ |
|
|
|
|
this.updateById(basicdataStoreContact); |
|
|
|
|
}else{ |
|
|
|
|
i.setDefaultType(false); |
|
|
|
|
this.updateById(i); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return true; |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.info("报错信息:",e.getMessage()); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|