耗材 检测开关 默认值问题
This commit is contained in:
@@ -87,7 +87,7 @@ public class ConsInfoServiceImpl extends ServiceImpl<ConsInfoMapper, ConsInfo> i
|
||||
@Override
|
||||
public List<ConsInfoDTO> getConsInfoList(ConsInfoDTO param) {
|
||||
QueryWrapper queryWrapper = buildQueryWrapper(param);
|
||||
queryWrapper.eq(ConsInfo::getStatus,SystemConstants.OneZero.ONE);
|
||||
queryWrapper.eq(ConsInfo::getStatus, SystemConstants.OneZero.ONE);
|
||||
List<ConsInfoDTO> list = super.listAs(queryWrapper, ConsInfoDTO.class);
|
||||
List<ConsGroup> consGroupList = consGroupMapper.selectListByQuery(QueryWrapper.create().eq(ConsGroup::getShopId, param.getShopId()));
|
||||
Map<Long, String> collect = consGroupList.stream().collect(Collectors.toMap(ConsGroup::getId, ConsGroup::getName));
|
||||
@@ -126,7 +126,9 @@ public class ConsInfoServiceImpl extends ServiceImpl<ConsInfoMapper, ConsInfo> i
|
||||
entity.setStockNumber(BigDecimal.ZERO);
|
||||
entity.setStatus(SystemConstants.OneZero.ONE);
|
||||
//entity.setConWarning(BigDecimal.ZERO);
|
||||
entity.setIsStock(SystemConstants.OneZero.ZERO);
|
||||
if (dto.getIsStock() == null) {
|
||||
entity.setIsStock(SystemConstants.OneZero.ZERO);
|
||||
}
|
||||
entity.setShopId(shopId);
|
||||
super.save(entity);
|
||||
dto.setId(entity.getId());
|
||||
@@ -168,7 +170,7 @@ public class ConsInfoServiceImpl extends ServiceImpl<ConsInfoMapper, ConsInfo> i
|
||||
public void enableConsInfo(Long id) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
UpdateChain.of(ConsInfo.class)
|
||||
.set(ConsInfo::getStatus,SystemConstants.OneZero.ONE)
|
||||
.set(ConsInfo::getStatus, SystemConstants.OneZero.ONE)
|
||||
.eq(ConsInfo::getId, id)
|
||||
.eq(ConsInfo::getShopId, shopId)
|
||||
.update();
|
||||
|
||||
Reference in New Issue
Block a user