diff --git a/opsli-modulars/opsli-modulars-test/src/main/java/org/opsli/modulars/gentest/carinfo/entity/TestCar.java b/opsli-modulars/opsli-modulars-test/src/main/java/org/opsli/modulars/gentest/carinfo/entity/TestCar.java new file mode 100755 index 0000000..b16b303 --- /dev/null +++ b/opsli-modulars/opsli-modulars-test/src/main/java/org/opsli/modulars/gentest/carinfo/entity/TestCar.java @@ -0,0 +1,69 @@ +/** + * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com + *
+ * 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 + *
+ * http://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 org.opsli.modulars.gentest.carinfo.entity; + +import java.util.Date; +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableLogic; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.opsli.core.base.entity.BaseEntity; + +/** + * @BelongsProject: opsli-boot + * @BelongsPackage: org.opsli.modulars.gentest.carinfo.entity + * @Author: Parker + * @CreateTime: 2020-12-20 20:12:57 + * @Description: 汽车信息 + */ +@Data +@EqualsAndHashCode(callSuper = false) +public class TestCar extends BaseEntity { + + + /** 汽车名称 */ + private String carName; + + /** 汽车类型 */ + private String carType; + + /** 汽车品牌 */ + private String carBrand; + + /** 生产日期 */ + private Date produceData; + + /** 是否启用 */ + private String izUsable; + + + // ======================================== + + + + + + + /** 多租户字段 */ + private String tenantId; + + /** 逻辑删除字段 */ + @TableLogic + private Integer deleted; + + +} diff --git a/opsli-modulars/opsli-modulars-test/src/main/java/org/opsli/modulars/gentest/carinfo/mapper/TestCarMapper.java b/opsli-modulars/opsli-modulars-test/src/main/java/org/opsli/modulars/gentest/carinfo/mapper/TestCarMapper.java new file mode 100755 index 0000000..44454a2 --- /dev/null +++ b/opsli-modulars/opsli-modulars-test/src/main/java/org/opsli/modulars/gentest/carinfo/mapper/TestCarMapper.java @@ -0,0 +1,33 @@ +/** +* Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com +*
+* 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 +*
+* http://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 org.opsli.modulars.gentest.carinfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.opsli.modulars.gentest.carinfo.entity.TestCar;
+
+/**
+* @BelongsProject: opsli-boot
+* @BelongsPackage: org.opsli.modulars.gentest.carinfo.mapper
+* @Author: Parker
+* @CreateTime: 2020-12-20 20:12:57
+* @Description: 汽车信息 Mapper
+*/
+@Mapper
+public interface TestCarMapper extends BaseMapper
+* 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
+*
+* http://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 org.opsli.modulars.gentest.carinfo.service;
+
+import org.opsli.core.base.service.interfaces.CrudServiceInterface;
+
+
+import org.opsli.modulars.gentest.carinfo.entity.TestCar;
+import org.opsli.api.wrapper.gentest.carinfo.TestCarModel;
+
+/**
+* @BelongsProject: opsli-boot
+* @BelongsPackage: org.opsli.modulars.gentest.carinfo.service
+* @Author: Parker
+* @CreateTime: 2020-12-20 20:12:57
+* @Description: 汽车信息 Service
+*/
+public interface ITestCarService extends CrudServiceInterface
+* 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
+*
+* http://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 org.opsli.modulars.gentest.carinfo.service.impl;
+
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.opsli.core.base.service.impl.CrudServiceImpl;
+
+import org.opsli.modulars.gentest.carinfo.entity.TestCar;
+import org.opsli.api.wrapper.gentest.carinfo.TestCarModel;
+import org.opsli.modulars.gentest.carinfo.service.ITestCarService;
+import org.opsli.modulars.gentest.carinfo.mapper.TestCarMapper;
+
+
+/**
+* @BelongsProject: opsli-boot
+* @BelongsPackage: org.opsli.modulars.gentest.carinfo.service.impl
+* @Author: Parker
+* @CreateTime: 2020-12-20 20:12:57
+* @Description: 汽车信息 Service Impl
+*/
+@Service
+public class TestCarServiceImpl extends CrudServiceImpl
+* 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
+*
+* http://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 org.opsli.modulars.gentest.carinfo.web;
+
+import cn.hutool.core.util.ReflectUtil;
+import org.opsli.core.base.service.interfaces.CrudServiceInterface;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.opsli.common.annotation.RequiresPermissionsCus;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.opsli.api.base.result.ResultVo;
+import org.opsli.common.annotation.ApiRestController;
+import org.opsli.common.annotation.EnableLog;
+import org.opsli.core.base.concroller.BaseRestController;
+import org.opsli.core.persistence.Page;
+import org.opsli.core.persistence.querybuilder.QueryBuilder;
+import org.opsli.core.persistence.querybuilder.WebQueryBuilder;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.lang.reflect.Method;
+
+import org.opsli.modulars.gentest.carinfo.entity.TestCar;
+import org.opsli.api.wrapper.gentest.carinfo.TestCarModel;
+import org.opsli.modulars.gentest.carinfo.service.ITestCarService;
+import org.opsli.api.web.gentest.carinfo.TestCarRestApi;
+
+/**
+* @BelongsProject: opsli-boot
+* @BelongsPackage: org.opsli.modulars.gentest.carinfo.web
+* @Author: Parker
+* @CreateTime: 2020-12-20 20:12:57
+* @Description: 汽车信息 Controller
+*/
+@Slf4j
+@ApiRestController("/gentest/carinfo")
+public class TestCarRestController extends BaseRestController