Administrator
yesterday 29674c95a7c1f57233c4182a72d01917a0be9689
src/main/java/cc/mrbird/febs/ai/service/impl/AiProductQuestionLabelServiceImpl.java
@@ -19,6 +19,7 @@
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
@Slf4j
@Service
@@ -50,7 +51,6 @@
        AiProductQuestionLabel entity = new AiProductQuestionLabel();
        entity.setId(UUID.getSimpleUUIDString());
        entity.setName(dto.getName());
        entity.setCode(dto.getCode());
        if (StrUtil.isNotEmpty(dto.getCompanyId())){
            entity.setCompanyId(dto.getCompanyId());
        }
@@ -66,7 +66,6 @@
        if(ObjectUtil.isNotNull( entity)){
            this.update(null,
                    Wrappers.lambdaUpdate(AiProductQuestionLabel.class)
                            .set(AiProductQuestionLabel::getCode, dto.getCode())
                            .set(AiProductQuestionLabel::getName, dto.getName())
                            .set(AiProductQuestionLabel::getUpdatedTime, new Date())
                            .eq(AiProductQuestionLabel::getId, id));
@@ -74,4 +73,14 @@
        }
        return new FebsResponse().success().message("操作成功");
    }
    @Override
    public List<AiProductQuestionLabel> listAllByCompanyId(String companyId) {
        LambdaQueryWrapper<AiProductQuestionLabel> query = Wrappers.lambdaQuery(AiProductQuestionLabel.class);
        if (StrUtil.isNotEmpty(companyId)){
            query.eq(AiProductQuestionLabel::getCompanyId, companyId);
        }
        query.orderByDesc(AiProductQuestionLabel::getCreatedTime);
        return aiProductQuestionLabelMapper.selectList(query);
    }
}