package cn.flightfeather.thirdappmodule.repository.dao
|
|
import cn.flightfeather.thirdappmodule.bean.entity.ChangeAdvice
|
import cn.flightfeather.thirdappmodule.common.database.DbFactory
|
import com.ping.greendao.gen.ChangeAdviceDao
|
import io.reactivex.Observable
|
|
/**
|
* @author riku
|
* Date: 2019/7/29
|
* 问题类型相关数据库操作
|
*/
|
class ProblemTypeDao {
|
|
/**
|
* 获取问题对应的整改建议
|
*/
|
fun getSuggestion(ptGuid: String): Observable<List<ChangeAdvice>> {
|
return DbFactory.getGreenDaoObservable().map {
|
it.changeAdviceDao.queryBuilder()
|
.where(
|
ChangeAdviceDao.Properties.AdProblemtypeguid.eq(ptGuid)
|
).list()
|
}
|
}
|
|
}
|