init
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.xq.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.xq.domain.AreaCode;
|
||||
@@ -22,7 +23,8 @@ public class AreaCodeServiceImpl extends ServiceImpl<AreaCodeMapper,AreaCode> im
|
||||
@Override
|
||||
public List<AreaCode> listAreaCode(AreaCodeQuery query) {
|
||||
List<AreaCode> list = this.list(Wrappers.lambdaQuery(AreaCode.class)
|
||||
.eq(AreaCode::getPcode, query.getPcode()));
|
||||
.eq(query.getPcode() != null,AreaCode::getPcode, query.getPcode())
|
||||
.eq(StringUtils.isNotBlank(query.getLevel()),AreaCode::getLevel,query.getLevel()));
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user