|
@@ -25,6 +25,7 @@ import com.xy.utils.enums.DictEnum;
|
|
|
import com.xy.utils.enums.DictSonEnum;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import jodd.introspector.MapperFunction;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -325,6 +326,18 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
return R.ok(copy(DeviceInfoDto.Vo.class, list(queryWrapper)));
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ @ApiOperation("商户设备算法列表")
|
|
|
+ public R<List<Long>> mercAlgorithmIdList(DeviceInfoDto.MercAlgorithmIdListDto dto){
|
|
|
+ String algorithmIdStr = LambdaUtils.getProperty(DeviceInfo::getAlgorithmId);
|
|
|
+ String mercStr = StringTools.humpToLine(LambdaUtils.getProperty(DeviceInfo::getMercId));
|
|
|
+ QueryWrapper<DeviceInfo> lqw = new QueryWrapper<DeviceInfo>()
|
|
|
+ .isNotNull(StringTools.humpToLine(algorithmIdStr))
|
|
|
+ .eq(mercStr,dto.getMercId())
|
|
|
+ .select(String.format("DISTINCT (%s) as %s",StringTools.humpToLine(algorithmIdStr),algorithmIdStr));
|
|
|
+ List<Long> list = listObjs(lqw, (MapperFunction<Object, Long>) o -> (Long)o);
|
|
|
+ return R.ok(list);
|
|
|
+ }
|
|
|
/**
|
|
|
* 获取商户设备列表
|
|
|
*
|
|
@@ -345,4 +358,4 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
throw new CommRuntimeException(msg);
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+}
|