优化注释

v1.4.1
hiparker 4 years ago
parent 07cb28b484
commit d66d6b1ec9

@ -24,11 +24,10 @@ import lombok.EqualsAndHashCode;
import org.opsli.core.base.entity.BaseEntity; import org.opsli.core.base.entity.BaseEntity;
/** /**
* @BelongsProject: opsli-boot *
* @BelongsPackage: org.opsli.modulars.gentest.carinfo.entity *
* @Author: Parker * @author Parker
* @CreateTime: 2020-12-20 20:12:57 * @date 2020-12-20 20:12:57
* @Description:
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ -54,10 +53,6 @@ public class TestCar extends BaseEntity {
// ======================================== // ========================================
/** 多租户字段 */ /** 多租户字段 */
private String tenantId; private String tenantId;
@ -65,5 +60,4 @@ public class TestCar extends BaseEntity {
@TableLogic @TableLogic
private Integer deleted; private Integer deleted;
} }

@ -21,11 +21,10 @@ import org.apache.ibatis.annotations.Param;
import org.opsli.modulars.gentest.carinfo.entity.TestCar; import org.opsli.modulars.gentest.carinfo.entity.TestCar;
/** /**
* @BelongsProject: opsli-boot * Mapper
* @BelongsPackage: org.opsli.modulars.gentest.carinfo.mapper *
* @Author: Parker * @author Parker
* @CreateTime: 2020-12-20 20:12:57 * @date 2020-12-20 20:12:57
* @Description: Mapper
*/ */
@Mapper @Mapper
public interface TestCarMapper extends BaseMapper<TestCar> { public interface TestCarMapper extends BaseMapper<TestCar> {

@ -22,11 +22,10 @@ import org.opsli.modulars.gentest.carinfo.entity.TestCar;
import org.opsli.api.wrapper.gentest.carinfo.TestCarModel; import org.opsli.api.wrapper.gentest.carinfo.TestCarModel;
/** /**
* @BelongsProject: opsli-boot * Service
* @BelongsPackage: org.opsli.modulars.gentest.carinfo.service *
* @Author: Parker * @author Parker
* @CreateTime: 2020-12-20 20:12:57 * @date 2020-12-20 20:12:57
* @Description: Service
*/ */
public interface ITestCarService extends CrudServiceInterface<TestCar, TestCarModel> { public interface ITestCarService extends CrudServiceInterface<TestCar, TestCarModel> {

@ -26,13 +26,11 @@ import org.opsli.api.wrapper.gentest.carinfo.TestCarModel;
import org.opsli.modulars.gentest.carinfo.service.ITestCarService; import org.opsli.modulars.gentest.carinfo.service.ITestCarService;
import org.opsli.modulars.gentest.carinfo.mapper.TestCarMapper; import org.opsli.modulars.gentest.carinfo.mapper.TestCarMapper;
/** /**
* @BelongsProject: opsli-boot * Service Impl
* @BelongsPackage: org.opsli.modulars.gentest.carinfo.service.impl *
* @Author: Parker * @author Parker
* @CreateTime: 2020-12-20 20:12:57 * @date 2020-12-20 20:12:57
* @Description: Service Impl
*/ */
@Service @Service
public class TestCarServiceImpl extends CrudServiceImpl<TestCarMapper, TestCar, TestCarModel> public class TestCarServiceImpl extends CrudServiceImpl<TestCarMapper, TestCar, TestCarModel>

@ -40,11 +40,10 @@ import org.opsli.modulars.gentest.carinfo.service.ITestCarService;
import org.opsli.api.web.gentest.carinfo.TestCarRestApi; import org.opsli.api.web.gentest.carinfo.TestCarRestApi;
/** /**
* @BelongsProject: opsli-boot * Controller
* @BelongsPackage: org.opsli.modulars.gentest.carinfo.web *
* @Author: Parker * @author Parker
* @CreateTime: 2020-12-20 20:12:57 * @date 2020-12-20 20:12:57
* @Description: Controller
*/ */
@Api(tags = TestCarRestApi.TITLE) @Api(tags = TestCarRestApi.TITLE)
@Slf4j @Slf4j
@ -163,7 +162,6 @@ public class TestCarRestController extends BaseRestController<TestCar, TestCarMo
* *
* @param request request * @param request request
* @param response response * @param response response
* @return ResultVo
*/ */
@ApiOperation(value = "导出Excel", notes = "导出Excel") @ApiOperation(value = "导出Excel", notes = "导出Excel")
@RequiresPermissionsCus("gentest_carinfo_export") @RequiresPermissionsCus("gentest_carinfo_export")
@ -194,7 +192,6 @@ public class TestCarRestController extends BaseRestController<TestCar, TestCarMo
* Excel * Excel
* RequiresPermissionsCus * RequiresPermissionsCus
* @param response response * @param response response
* @return ResultVo
*/ */
@ApiOperation(value = "导出Excel模版", notes = "导出Excel模版") @ApiOperation(value = "导出Excel模版", notes = "导出Excel模版")
@RequiresPermissionsCus("gentest_carinfo_import") @RequiresPermissionsCus("gentest_carinfo_import")

@ -24,11 +24,10 @@ import lombok.EqualsAndHashCode;
import org.opsli.core.base.entity.BaseEntity; import org.opsli.core.base.entity.BaseEntity;
/** /**
* @BelongsProject: opsli-boot *
* @BelongsPackage: org.opsli.modulars.gentest.user.entity *
* @Author: * @author Parker
* @CreateTime: 2020-11-22 12:12:05 * @date 2020-11-22 12:12:05
* @Description:
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ -53,16 +52,10 @@ public class TestUser extends BaseEntity {
// ======================================== // ========================================
/** 多租户字段 */ /** 多租户字段 */
private String tenantId; private String tenantId;
/** 逻辑删除字段 */ /** 逻辑删除字段 */
private Integer deleted; private Integer deleted;
} }

@ -21,11 +21,10 @@ import org.apache.ibatis.annotations.Param;
import org.opsli.modulars.gentest.user.entity.TestUser; import org.opsli.modulars.gentest.user.entity.TestUser;
/** /**
* @BelongsProject: opsli-boot * Mapper
* @BelongsPackage: org.opsli.modulars.gentest.user.mapper *
* @Author: * @author Parker
* @CreateTime: 2020-11-22 12:12:05 * @date 2020-11-22 12:12:05
* @Description: Mapper
*/ */
@Mapper @Mapper
public interface TestUserMapper extends BaseMapper<TestUser> { public interface TestUserMapper extends BaseMapper<TestUser> {

@ -22,11 +22,10 @@ import org.opsli.modulars.gentest.user.entity.TestUser;
import org.opsli.api.wrapper.gentest.user.TestUserModel; import org.opsli.api.wrapper.gentest.user.TestUserModel;
/** /**
* @BelongsProject: opsli-boot * Service
* @BelongsPackage: org.opsli.modulars.gentest.user.service *
* @Author: * @author Parker
* @CreateTime: 2020-11-22 12:12:05 * @date 2020-11-22 12:12:05
* @Description: Service
*/ */
public interface ITestUserService extends CrudServiceInterface<TestUser, TestUserModel> { public interface ITestUserService extends CrudServiceInterface<TestUser, TestUserModel> {

@ -28,11 +28,10 @@ import org.opsli.modulars.gentest.user.mapper.TestUserMapper;
/** /**
* @BelongsProject: opsli-boot * Service Impl
* @BelongsPackage: org.opsli.modulars.gentest.user.service.impl *
* @Author: * @author Parker
* @CreateTime: 2020-11-22 12:12:05 * @date 2020-11-22 12:12:05
* @Description: Service Impl
*/ */
@Service @Service
public class TestUserServiceImpl extends CrudServiceImpl<TestUserMapper, TestUser, TestUserModel> public class TestUserServiceImpl extends CrudServiceImpl<TestUserMapper, TestUser, TestUserModel>

@ -41,11 +41,10 @@ import org.opsli.api.web.gentest.user.TestUserRestApi;
import java.lang.reflect.Method; import java.lang.reflect.Method;
/** /**
* @BelongsProject: opsli-boot * Controller
* @BelongsPackage: org.opsli.modulars.gentest.user.web *
* @Author: * @author Parker
* @CreateTime: 2020-11-22 12:12:05 * @date 2020-11-22 12:12:05
* @Description: Controller
*/ */
@Api(tags = TestUserRestApi.TITLE) @Api(tags = TestUserRestApi.TITLE)
@Slf4j @Slf4j
@ -156,7 +155,6 @@ public class TestUserRestController extends BaseRestController<TestUser, TestUse
* RequiresPermissionsCus * RequiresPermissionsCus
* @param request request * @param request request
* @param response response * @param response response
* @return ResultVo
*/ */
@ApiOperation(value = "导出Excel", notes = "导出Excel") @ApiOperation(value = "导出Excel", notes = "导出Excel")
@RequiresPermissionsCus("gentest_user_export") @RequiresPermissionsCus("gentest_user_export")
@ -187,7 +185,6 @@ public class TestUserRestController extends BaseRestController<TestUser, TestUse
* Excel * Excel
* RequiresPermissionsCus * RequiresPermissionsCus
* @param response response * @param response response
* @return ResultVo
*/ */
@ApiOperation(value = "导出Excel模版", notes = "导出Excel模版") @ApiOperation(value = "导出Excel模版", notes = "导出Excel模版")
@RequiresPermissionsCus("gentest_user_import") @RequiresPermissionsCus("gentest_user_import")

@ -1,3 +1,18 @@
/**
* Copyright 2020 OPSLI https://www.opsli.com
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.test.entity; package org.opsli.modulars.test.entity;
import lombok.Data; import lombok.Data;
@ -5,11 +20,10 @@ import lombok.EqualsAndHashCode;
import org.opsli.core.base.entity.BaseEntity; import org.opsli.core.base.entity.BaseEntity;
/** /**
* @BelongsProject: opsli-boot *
* @BelongsPackage: org.opsli.modulars.test.entity *
* @Author: Parker * @author Parker
* @CreateTime: 2020-09-16 17:33 * @date 2020-09-16 17:33
* @Description:
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)

@ -1,3 +1,18 @@
/**
* Copyright 2020 OPSLI https://www.opsli.com
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.test.mapper; package org.opsli.modulars.test.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -5,15 +20,19 @@ import org.apache.ibatis.annotations.Mapper;
import org.opsli.modulars.test.entity.TestEntity; import org.opsli.modulars.test.entity.TestEntity;
/** /**
* @BelongsProject: opsli-boot * Mapper
* @BelongsPackage: org.opsli.modulars.test.mapper *
* @Author: Parker * @author Parker
* @CreateTime: 2020-09-17 13:01 * @date 2020-09-17 13:01
* @Description: Mapper
*/ */
@Mapper @Mapper
public interface TestMapper extends BaseMapper<TestEntity> { public interface TestMapper extends BaseMapper<TestEntity> {
/**
*
* @param testEntity Entity
* @return TestEntity
*/
TestEntity getByName(TestEntity testEntity); TestEntity getByName(TestEntity testEntity);
} }

@ -1,3 +1,18 @@
/**
* Copyright 2020 OPSLI https://www.opsli.com
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.test.service; package org.opsli.modulars.test.service;
import org.opsli.api.wrapper.test.TestModel; import org.opsli.api.wrapper.test.TestModel;
@ -5,18 +20,17 @@ import org.opsli.core.base.service.interfaces.CrudServiceInterface;
import org.opsli.modulars.test.entity.TestEntity; import org.opsli.modulars.test.entity.TestEntity;
/** /**
* @BelongsProject: opsli-boot * Service
* @BelongsPackage: org.opsli.modulars.test.service *
* @Author: Parker * @author Parker
* @CreateTime: 2020-09-17 13:07 * @date 2020-09-17 13:01
* @Description:
*/ */
public interface ITestService extends CrudServiceInterface<TestEntity,TestModel> { public interface ITestService extends CrudServiceInterface<TestEntity,TestModel> {
/** /**
* *
* @param model * @param model
* @return * @return
*/ */
TestModel getByName(TestModel model); TestModel getByName(TestModel model);

@ -1,3 +1,18 @@
/**
* Copyright 2020 OPSLI https://www.opsli.com
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.test.service.impl; package org.opsli.modulars.test.service.impl;
import org.opsli.api.wrapper.test.TestModel; import org.opsli.api.wrapper.test.TestModel;
@ -15,18 +30,15 @@ import java.util.Collection;
/** /**
* @BelongsProject: opsli-boot *
* @BelongsPackage: org.opsli.modulars.test.service
* @Author: Parker
* @CreateTime: 2020-09-16 17:34
* @Description:
* *
* @EnableHotData * @EnableHotData
* *
* *
* -- @HotDataPut @HotDataDel * -- @HotDataPut @HotDataDel
* *
* * @author Parker
* @date 2020-09-17 13:01
*/ */
@Service @Service
@EnableHotData @EnableHotData

@ -24,13 +24,11 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.Method; import java.lang.reflect.Method;
/** /**
* @BelongsProject: opsli-boot * Controller
* @BelongsPackage: org.opsli.modulars.test.web *
* @Author: Parker * @author Parker
* @CreateTime: 2020-09-13 17:40 * @date 2020-09-17 13:01
* @Description:
*/ */
@Api(tags = "测试类") @Api(tags = "测试类")
@Slf4j @Slf4j
@ -140,7 +138,6 @@ public class TestRestController extends BaseRestController<TestEntity, TestModel
* Excel * Excel
* @param request request * @param request request
* @param response response * @param response response
* @return ResultVo
*/ */
@ApiOperation(value = "导出Excel", notes = "导出Excel") @ApiOperation(value = "导出Excel", notes = "导出Excel")
@RequiresPermissionsCus("gentest_test_export") @RequiresPermissionsCus("gentest_test_export")
@ -169,7 +166,6 @@ public class TestRestController extends BaseRestController<TestEntity, TestModel
/** /**
* Excel * Excel
* @param response response * @param response response
* @return ResultVo
*/ */
@ApiOperation(value = "导出Excel模版", notes = "导出Excel模版") @ApiOperation(value = "导出Excel模版", notes = "导出Excel模版")
@RequiresPermissionsCus("gentest_test_import") @RequiresPermissionsCus("gentest_test_import")

@ -1,49 +0,0 @@
package org.opsli.modulars.test.web;
import io.swagger.annotations.ApiOperation;
import org.opsli.api.base.result.ResultVo;
import org.opsli.api.web.test.TestApi;
import org.opsli.api.wrapper.test.TestModel;
import org.opsli.common.annotation.ApiRestController;
import org.opsli.common.constants.CacheConstants;
import org.opsli.core.cache.local.CacheUtil;
import org.opsli.plugins.cache.EhCachePlugin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import java.util.ArrayList;
import java.util.List;
/**
* @BelongsProject: opsli-boot
* @BelongsPackage: org.opsli.modulars.test.web
* @Author: Parker
* @CreateTime: 2020-09-13 17:40
* @Description:
*/
//@ApiRestController("/test2")
public class TestRestRestController2{
@Autowired
TestApi testApi;
@Autowired
EhCachePlugin ehCachePlugin;
@ApiOperation(value = "测试2", notes = "测试2")
@GetMapping("/getDictBy")
public ResultVo<?> t1(){
String id = "test";
List<TestModel> testModelList = new ArrayList<>();
for (int i = 0; i < 10; i++) {
TestModel testModel = new TestModel();
testModel.setId(id+i);
testModel.setName("测试数据"+i);
testModelList.add(testModel);
CacheUtil.put(id+i,testModel);
}
return ResultVo.success(testModelList);
}
}
Loading…
Cancel
Save