diff --git a/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/DeviceBuilder.java b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/DeviceBuilder.java new file mode 100644 index 000000000..43ddea5ea --- /dev/null +++ b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/DeviceBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2016-present the IoT DC3 original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.github.pnoker.center.manager.entity.builder; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.github.pnoker.center.manager.entity.bo.DeviceBO; +import io.github.pnoker.center.manager.entity.model.DeviceDO; +import io.github.pnoker.center.manager.entity.vo.DeviceVO; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +import java.util.List; + +/** + * Device Builder + * + * @author pnoker + * @since 2022.1.0 + */ +@Mapper(componentModel = "spring") +public interface DeviceBuilder { + + /** + * VO to BO + * + * @param entityVO EntityVO + * @return EntityBO + */ + DeviceBO buildBOByVO(DeviceVO entityVO); + + /** + * VOList to BOList + * + * @param entityVOList EntityVO Array + * @return EntityBO Array + */ + List buildBOListByVOList(List entityVOList); + + /** + * BO to DO + * + * @param entityBO EntityBO + * @return EntityDO + */ + @Mapping(target = "deleted", ignore = true) + DeviceDO buildDOByBO(DeviceBO entityBO); + + /** + * BOList to DOList + * + * @param entityBOList EntityBO Array + * @return EntityDO Array + */ + List buildDOListByBOList(List entityBOList); + + /** + * DO to BO + * + * @param entityDO EntityDO + * @return EntityBO + */ + DeviceBO buildBOByDO(DeviceDO entityDO); + + /** + * DOList to BOList + * + * @param entityDOList EntityDO Array + * @return EntityBO Array + */ + List buildBOByDO(List entityDOList); + + /** + * BO to VO + * + * @param entityBO EntityBO + * @return EntityVO + */ + DeviceVO buildVOByBO(DeviceBO entityBO); + + /** + * BOList to VOList + * + * @param entityBOList EntityBO Array + * @return EntityVO Array + */ + List buildVOListByBOList(List entityBOList); + + /** + * DOPage to BOPage + * + * @param entityPageDO EntityDO Page + * @return EntityBO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildBOPageByDOPage(Page entityPageDO); + + /** + * BOPage to VOPage + * + * @param entityPageBO EntityBO Page + * @return EntityVO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildVOPageByBOPage(Page entityPageBO); +} \ No newline at end of file diff --git a/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/DriverAttributeBuilder.java b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/DriverAttributeBuilder.java new file mode 100644 index 000000000..b1789d520 --- /dev/null +++ b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/DriverAttributeBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2016-present the IoT DC3 original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.github.pnoker.center.manager.entity.builder; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.github.pnoker.center.manager.entity.bo.DriverAttributeBO; +import io.github.pnoker.center.manager.entity.model.DriverAttributeDO; +import io.github.pnoker.center.manager.entity.vo.DriverAttributeVO; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +import java.util.List; + +/** + * DriverAttribute Builder + * + * @author pnoker + * @since 2022.1.0 + */ +@Mapper(componentModel = "spring") +public interface DriverAttributeBuilder { + + /** + * VO to BO + * + * @param entityVO EntityVO + * @return EntityBO + */ + DriverAttributeBO buildBOByVO(DriverAttributeVO entityVO); + + /** + * VOList to BOList + * + * @param entityVOList EntityVO Array + * @return EntityBO Array + */ + List buildBOListByVOList(List entityVOList); + + /** + * BO to DO + * + * @param entityBO EntityBO + * @return EntityDO + */ + @Mapping(target = "deleted", ignore = true) + DriverAttributeDO buildDOByBO(DriverAttributeBO entityBO); + + /** + * BOList to DOList + * + * @param entityBOList EntityBO Array + * @return EntityDO Array + */ + List buildDOListByBOList(List entityBOList); + + /** + * DO to BO + * + * @param entityDO EntityDO + * @return EntityBO + */ + DriverAttributeBO buildBOByDO(DriverAttributeDO entityDO); + + /** + * DOList to BOList + * + * @param entityDOList EntityDO Array + * @return EntityBO Array + */ + List buildBOByDO(List entityDOList); + + /** + * BO to VO + * + * @param entityBO EntityBO + * @return EntityVO + */ + DriverAttributeVO buildVOByBO(DriverAttributeBO entityBO); + + /** + * BOList to VOList + * + * @param entityBOList EntityBO Array + * @return EntityVO Array + */ + List buildVOListByBOList(List entityBOList); + + /** + * DOPage to BOPage + * + * @param entityPageDO EntityDO Page + * @return EntityBO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildBOPageByDOPage(Page entityPageDO); + + /** + * BOPage to VOPage + * + * @param entityPageBO EntityBO Page + * @return EntityVO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildVOPageByBOPage(Page entityPageBO); +} \ No newline at end of file diff --git a/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/DriverAttributeConfigBuilder.java b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/DriverAttributeConfigBuilder.java new file mode 100644 index 000000000..db2f250e2 --- /dev/null +++ b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/DriverAttributeConfigBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2016-present the IoT DC3 original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.github.pnoker.center.manager.entity.builder; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.github.pnoker.center.manager.entity.bo.DriverAttributeConfigBO; +import io.github.pnoker.center.manager.entity.model.DriverAttributeConfigDO; +import io.github.pnoker.center.manager.entity.vo.DriverAttributeConfigVO; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +import java.util.List; + +/** + * DriverAttributeConfig Builder + * + * @author pnoker + * @since 2022.1.0 + */ +@Mapper(componentModel = "spring") +public interface DriverAttributeConfigBuilder { + + /** + * VO to BO + * + * @param entityVO EntityVO + * @return EntityBO + */ + DriverAttributeConfigBO buildBOByVO(DriverAttributeConfigVO entityVO); + + /** + * VOList to BOList + * + * @param entityVOList EntityVO Array + * @return EntityBO Array + */ + List buildBOListByVOList(List entityVOList); + + /** + * BO to DO + * + * @param entityBO EntityBO + * @return EntityDO + */ + @Mapping(target = "deleted", ignore = true) + DriverAttributeConfigDO buildDOByBO(DriverAttributeConfigBO entityBO); + + /** + * BOList to DOList + * + * @param entityBOList EntityBO Array + * @return EntityDO Array + */ + List buildDOListByBOList(List entityBOList); + + /** + * DO to BO + * + * @param entityDO EntityDO + * @return EntityBO + */ + DriverAttributeConfigBO buildBOByDO(DriverAttributeConfigDO entityDO); + + /** + * DOList to BOList + * + * @param entityDOList EntityDO Array + * @return EntityBO Array + */ + List buildBOByDO(List entityDOList); + + /** + * BO to VO + * + * @param entityBO EntityBO + * @return EntityVO + */ + DriverAttributeConfigVO buildVOByBO(DriverAttributeConfigBO entityBO); + + /** + * BOList to VOList + * + * @param entityBOList EntityBO Array + * @return EntityVO Array + */ + List buildVOListByBOList(List entityBOList); + + /** + * DOPage to BOPage + * + * @param entityPageDO EntityDO Page + * @return EntityBO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildBOPageByDOPage(Page entityPageDO); + + /** + * BOPage to VOPage + * + * @param entityPageBO EntityBO Page + * @return EntityVO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildVOPageByBOPage(Page entityPageBO); +} \ No newline at end of file diff --git a/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/DriverBuilder.java b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/DriverBuilder.java new file mode 100644 index 000000000..514e19934 --- /dev/null +++ b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/DriverBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2016-present the IoT DC3 original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.github.pnoker.center.manager.entity.builder; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.github.pnoker.center.manager.entity.bo.DriverBO; +import io.github.pnoker.center.manager.entity.model.DriverDO; +import io.github.pnoker.center.manager.entity.vo.DriverVO; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +import java.util.List; + +/** + * Driver Builder + * + * @author pnoker + * @since 2022.1.0 + */ +@Mapper(componentModel = "spring") +public interface DriverBuilder { + + /** + * VO to BO + * + * @param entityVO EntityVO + * @return EntityBO + */ + DriverBO buildBOByVO(DriverVO entityVO); + + /** + * VOList to BOList + * + * @param entityVOList EntityVO Array + * @return EntityBO Array + */ + List buildBOListByVOList(List entityVOList); + + /** + * BO to DO + * + * @param entityBO EntityBO + * @return EntityDO + */ + @Mapping(target = "deleted", ignore = true) + DriverDO buildDOByBO(DriverBO entityBO); + + /** + * BOList to DOList + * + * @param entityBOList EntityBO Array + * @return EntityDO Array + */ + List buildDOListByBOList(List entityBOList); + + /** + * DO to BO + * + * @param entityDO EntityDO + * @return EntityBO + */ + DriverBO buildBOByDO(DriverDO entityDO); + + /** + * DOList to BOList + * + * @param entityDOList EntityDO Array + * @return EntityBO Array + */ + List buildBOByDO(List entityDOList); + + /** + * BO to VO + * + * @param entityBO EntityBO + * @return EntityVO + */ + DriverVO buildVOByBO(DriverBO entityBO); + + /** + * BOList to VOList + * + * @param entityBOList EntityBO Array + * @return EntityVO Array + */ + List buildVOListByBOList(List entityBOList); + + /** + * DOPage to BOPage + * + * @param entityPageDO EntityDO Page + * @return EntityBO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildBOPageByDOPage(Page entityPageDO); + + /** + * BOPage to VOPage + * + * @param entityPageBO EntityBO Page + * @return EntityVO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildVOPageByBOPage(Page entityPageBO); +} \ No newline at end of file diff --git a/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/PointAttributeBuilder.java b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/PointAttributeBuilder.java new file mode 100644 index 000000000..179062eac --- /dev/null +++ b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/PointAttributeBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2016-present the IoT DC3 original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.github.pnoker.center.manager.entity.builder; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.github.pnoker.center.manager.entity.bo.PointAttributeBO; +import io.github.pnoker.center.manager.entity.model.PointAttributeDO; +import io.github.pnoker.center.manager.entity.vo.PointAttributeVO; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +import java.util.List; + +/** + * PointAttribute Builder + * + * @author pnoker + * @since 2022.1.0 + */ +@Mapper(componentModel = "spring") +public interface PointAttributeBuilder { + + /** + * VO to BO + * + * @param entityVO EntityVO + * @return EntityBO + */ + PointAttributeBO buildBOByVO(PointAttributeVO entityVO); + + /** + * VOList to BOList + * + * @param entityVOList EntityVO Array + * @return EntityBO Array + */ + List buildBOListByVOList(List entityVOList); + + /** + * BO to DO + * + * @param entityBO EntityBO + * @return EntityDO + */ + @Mapping(target = "deleted", ignore = true) + PointAttributeDO buildDOByBO(PointAttributeBO entityBO); + + /** + * BOList to DOList + * + * @param entityBOList EntityBO Array + * @return EntityDO Array + */ + List buildDOListByBOList(List entityBOList); + + /** + * DO to BO + * + * @param entityDO EntityDO + * @return EntityBO + */ + PointAttributeBO buildBOByDO(PointAttributeDO entityDO); + + /** + * DOList to BOList + * + * @param entityDOList EntityDO Array + * @return EntityBO Array + */ + List buildBOByDO(List entityDOList); + + /** + * BO to VO + * + * @param entityBO EntityBO + * @return EntityVO + */ + PointAttributeVO buildVOByBO(PointAttributeBO entityBO); + + /** + * BOList to VOList + * + * @param entityBOList EntityBO Array + * @return EntityVO Array + */ + List buildVOListByBOList(List entityBOList); + + /** + * DOPage to BOPage + * + * @param entityPageDO EntityDO Page + * @return EntityBO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildBOPageByDOPage(Page entityPageDO); + + /** + * BOPage to VOPage + * + * @param entityPageBO EntityBO Page + * @return EntityVO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildVOPageByBOPage(Page entityPageBO); +} \ No newline at end of file diff --git a/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/PointAttributeConfigBuilder.java b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/PointAttributeConfigBuilder.java new file mode 100644 index 000000000..eef335423 --- /dev/null +++ b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/PointAttributeConfigBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2016-present the IoT DC3 original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.github.pnoker.center.manager.entity.builder; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.github.pnoker.center.manager.entity.bo.PointAttributeConfigBO; +import io.github.pnoker.center.manager.entity.model.PointAttributeConfigDO; +import io.github.pnoker.center.manager.entity.vo.PointAttributeConfigVO; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +import java.util.List; + +/** + * PointAttributeConfig Builder + * + * @author pnoker + * @since 2022.1.0 + */ +@Mapper(componentModel = "spring") +public interface PointAttributeConfigBuilder { + + /** + * VO to BO + * + * @param entityVO EntityVO + * @return EntityBO + */ + PointAttributeConfigBO buildBOByVO(PointAttributeConfigVO entityVO); + + /** + * VOList to BOList + * + * @param entityVOList EntityVO Array + * @return EntityBO Array + */ + List buildBOListByVOList(List entityVOList); + + /** + * BO to DO + * + * @param entityBO EntityBO + * @return EntityDO + */ + @Mapping(target = "deleted", ignore = true) + PointAttributeConfigDO buildDOByBO(PointAttributeConfigBO entityBO); + + /** + * BOList to DOList + * + * @param entityBOList EntityBO Array + * @return EntityDO Array + */ + List buildDOListByBOList(List entityBOList); + + /** + * DO to BO + * + * @param entityDO EntityDO + * @return EntityBO + */ + PointAttributeConfigBO buildBOByDO(PointAttributeConfigDO entityDO); + + /** + * DOList to BOList + * + * @param entityDOList EntityDO Array + * @return EntityBO Array + */ + List buildBOByDO(List entityDOList); + + /** + * BO to VO + * + * @param entityBO EntityBO + * @return EntityVO + */ + PointAttributeConfigVO buildVOByBO(PointAttributeConfigBO entityBO); + + /** + * BOList to VOList + * + * @param entityBOList EntityBO Array + * @return EntityVO Array + */ + List buildVOListByBOList(List entityBOList); + + /** + * DOPage to BOPage + * + * @param entityPageDO EntityDO Page + * @return EntityBO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildBOPageByDOPage(Page entityPageDO); + + /** + * BOPage to VOPage + * + * @param entityPageBO EntityBO Page + * @return EntityVO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildVOPageByBOPage(Page entityPageBO); +} \ No newline at end of file diff --git a/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/PointBuilder.java b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/PointBuilder.java new file mode 100644 index 000000000..3fd1d8912 --- /dev/null +++ b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/PointBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2016-present the IoT DC3 original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.github.pnoker.center.manager.entity.builder; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.github.pnoker.center.manager.entity.bo.PointBO; +import io.github.pnoker.center.manager.entity.model.PointDO; +import io.github.pnoker.center.manager.entity.vo.PointVO; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +import java.util.List; + +/** + * Point Builder + * + * @author pnoker + * @since 2022.1.0 + */ +@Mapper(componentModel = "spring") +public interface PointBuilder { + + /** + * VO to BO + * + * @param entityVO EntityVO + * @return EntityBO + */ + PointBO buildBOByVO(PointVO entityVO); + + /** + * VOList to BOList + * + * @param entityVOList EntityVO Array + * @return EntityBO Array + */ + List buildBOListByVOList(List entityVOList); + + /** + * BO to DO + * + * @param entityBO EntityBO + * @return EntityDO + */ + @Mapping(target = "deleted", ignore = true) + PointDO buildDOByBO(PointBO entityBO); + + /** + * BOList to DOList + * + * @param entityBOList EntityBO Array + * @return EntityDO Array + */ + List buildDOListByBOList(List entityBOList); + + /** + * DO to BO + * + * @param entityDO EntityDO + * @return EntityBO + */ + PointBO buildBOByDO(PointDO entityDO); + + /** + * DOList to BOList + * + * @param entityDOList EntityDO Array + * @return EntityBO Array + */ + List buildBOByDO(List entityDOList); + + /** + * BO to VO + * + * @param entityBO EntityBO + * @return EntityVO + */ + PointVO buildVOByBO(PointBO entityBO); + + /** + * BOList to VOList + * + * @param entityBOList EntityBO Array + * @return EntityVO Array + */ + List buildVOListByBOList(List entityBOList); + + /** + * DOPage to BOPage + * + * @param entityPageDO EntityDO Page + * @return EntityBO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildBOPageByDOPage(Page entityPageDO); + + /** + * BOPage to VOPage + * + * @param entityPageBO EntityBO Page + * @return EntityVO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildVOPageByBOPage(Page entityPageBO); +} \ No newline at end of file diff --git a/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/ProfileBindBuilder.java b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/ProfileBindBuilder.java new file mode 100644 index 000000000..e610ef79f --- /dev/null +++ b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/ProfileBindBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2016-present the IoT DC3 original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.github.pnoker.center.manager.entity.builder; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.github.pnoker.center.manager.entity.bo.ProfileBindBO; +import io.github.pnoker.center.manager.entity.model.ProfileBindDO; +import io.github.pnoker.center.manager.entity.vo.ProfileBindVO; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +import java.util.List; + +/** + * ProfileBind Builder + * + * @author pnoker + * @since 2022.1.0 + */ +@Mapper(componentModel = "spring") +public interface ProfileBindBuilder { + + /** + * VO to BO + * + * @param entityVO EntityVO + * @return EntityBO + */ + ProfileBindBO buildBOByVO(ProfileBindVO entityVO); + + /** + * VOList to BOList + * + * @param entityVOList EntityVO Array + * @return EntityBO Array + */ + List buildBOListByVOList(List entityVOList); + + /** + * BO to DO + * + * @param entityBO EntityBO + * @return EntityDO + */ + @Mapping(target = "deleted", ignore = true) + ProfileBindDO buildDOByBO(ProfileBindBO entityBO); + + /** + * BOList to DOList + * + * @param entityBOList EntityBO Array + * @return EntityDO Array + */ + List buildDOListByBOList(List entityBOList); + + /** + * DO to BO + * + * @param entityDO EntityDO + * @return EntityBO + */ + ProfileBindBO buildBOByDO(ProfileBindDO entityDO); + + /** + * DOList to BOList + * + * @param entityDOList EntityDO Array + * @return EntityBO Array + */ + List buildBOByDO(List entityDOList); + + /** + * BO to VO + * + * @param entityBO EntityBO + * @return EntityVO + */ + ProfileBindVO buildVOByBO(ProfileBindBO entityBO); + + /** + * BOList to VOList + * + * @param entityBOList EntityBO Array + * @return EntityVO Array + */ + List buildVOListByBOList(List entityBOList); + + /** + * DOPage to BOPage + * + * @param entityPageDO EntityDO Page + * @return EntityBO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildBOPageByDOPage(Page entityPageDO); + + /** + * BOPage to VOPage + * + * @param entityPageBO EntityBO Page + * @return EntityVO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildVOPageByBOPage(Page entityPageBO); +} \ No newline at end of file diff --git a/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/ProfileBuilder.java b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/ProfileBuilder.java new file mode 100644 index 000000000..944dbd83e --- /dev/null +++ b/dc3-center/dc3-center-manager/src/main/java/io/github/pnoker/center/manager/entity/builder/ProfileBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2016-present the IoT DC3 original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.github.pnoker.center.manager.entity.builder; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.github.pnoker.center.manager.entity.bo.ProfileBO; +import io.github.pnoker.center.manager.entity.model.ProfileDO; +import io.github.pnoker.center.manager.entity.vo.ProfileVO; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +import java.util.List; + +/** + * Profile Builder + * + * @author pnoker + * @since 2022.1.0 + */ +@Mapper(componentModel = "spring") +public interface ProfileBuilder { + + /** + * VO to BO + * + * @param entityVO EntityVO + * @return EntityBO + */ + ProfileBO buildBOByVO(ProfileVO entityVO); + + /** + * VOList to BOList + * + * @param entityVOList EntityVO Array + * @return EntityBO Array + */ + List buildBOListByVOList(List entityVOList); + + /** + * BO to DO + * + * @param entityBO EntityBO + * @return EntityDO + */ + @Mapping(target = "deleted", ignore = true) + ProfileDO buildDOByBO(ProfileBO entityBO); + + /** + * BOList to DOList + * + * @param entityBOList EntityBO Array + * @return EntityDO Array + */ + List buildDOListByBOList(List entityBOList); + + /** + * DO to BO + * + * @param entityDO EntityDO + * @return EntityBO + */ + ProfileBO buildBOByDO(ProfileDO entityDO); + + /** + * DOList to BOList + * + * @param entityDOList EntityDO Array + * @return EntityBO Array + */ + List buildBOByDO(List entityDOList); + + /** + * BO to VO + * + * @param entityBO EntityBO + * @return EntityVO + */ + ProfileVO buildVOByBO(ProfileBO entityBO); + + /** + * BOList to VOList + * + * @param entityBOList EntityBO Array + * @return EntityVO Array + */ + List buildVOListByBOList(List entityBOList); + + /** + * DOPage to BOPage + * + * @param entityPageDO EntityDO Page + * @return EntityBO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildBOPageByDOPage(Page entityPageDO); + + /** + * BOPage to VOPage + * + * @param entityPageBO EntityBO Page + * @return EntityVO Page + */ + @Mapping(target = "optimizeJoinOfCountSql", ignore = true) + Page buildVOPageByBOPage(Page entityPageBO); +} \ No newline at end of file