Skip to content

Commit 99845ee

Browse files
Merge pull request #5 from geekidea/dev
优化代码生成器模板 Former-commit-id: 274377d4ba08f25593116f2d4168f495a6e86c03
2 parents 1b566b9 + 4b797d9 commit 99845ee

30 files changed

+275
-489
lines changed

src/main/java/io/geekidea/springbootplus/common/service/impl/BaseServiceImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
2222
import io.geekidea.springbootplus.common.enums.OrderEnum;
2323
import io.geekidea.springbootplus.common.service.BaseService;
24-
import io.geekidea.springbootplus.common.web.vo.QueryParam;
24+
import io.geekidea.springbootplus.common.web.param.QueryParam;
2525

2626
/**
2727
* @author geekidea

src/main/java/io/geekidea/springbootplus/common/web/vo/QueryParam.java src/main/java/io/geekidea/springbootplus/common/web/param/QueryParam.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package io.geekidea.springbootplus.common.web.vo;
17+
package io.geekidea.springbootplus.common.web.param;
1818

1919
import io.geekidea.springbootplus.common.constant.CommonConstant;
2020
import io.swagger.annotations.ApiModel;

src/main/java/io/geekidea/springbootplus/example/redislock/RedisLockController.java

-89
This file was deleted.

src/main/java/io/geekidea/springbootplus/example/redislock/RedisLockExampleService.java

-34
This file was deleted.

src/main/java/io/geekidea/springbootplus/example/redislock/RedisLockExampleServiceImpl.java

-61
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,43 @@
11
package io.geekidea.springbootplus.system.entity;
22

3+
import com.baomidou.mybatisplus.annotation.IdType;
4+
import com.baomidou.mybatisplus.annotation.TableId;
35
import io.geekidea.springbootplus.common.entity.BaseEntity;
46
import io.swagger.annotations.ApiModel;
7+
import io.swagger.annotations.ApiModelProperty;
58
import lombok.Data;
69
import lombok.EqualsAndHashCode;
710

11+
import java.time.LocalDateTime;
12+
813
/**
914
* <p>
1015
*
1116
* </p>
1217
*
1318
* @author geekidea
14-
* @since 2019-06-20
19+
* @since 2019-07-27
1520
*/
1621
@Data
1722
@EqualsAndHashCode(callSuper = true)
18-
@ApiModel(value="Ip对象")
23+
@ApiModel(value="Ip对象", description="")
1924
public class Ip extends BaseEntity {
2025

2126
private static final long serialVersionUID = 1L;
2227

23-
private String ipStart;
28+
private String ipStart;
2429

25-
private String ipEnd;
30+
private String ipEnd;
2631

27-
private String area;
32+
private String area;
2833

29-
private String operator;
34+
private String operator;
3035

31-
private Long id;
36+
@TableId(value = "id", type = IdType.AUTO)
37+
private Long id;
3238

33-
private Long ipStartNum;
39+
private Long ipStartNum;
3440

35-
private Long ipEndNum;
41+
private Long ipEndNum;
3642

3743
}

src/main/java/io/geekidea/springbootplus/system/entity/SysLog.java

+3-18
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
1-
/**
2-
* Copyright 2019-2029 geekidea(https://github.com/geekidea)
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
171
package io.geekidea.springbootplus.system.entity;
182

193
import com.baomidou.mybatisplus.annotation.IdType;
4+
import java.time.LocalDateTime;
205
import com.baomidou.mybatisplus.annotation.TableId;
216
import io.geekidea.springbootplus.common.entity.BaseEntity;
227
import io.swagger.annotations.ApiModel;
@@ -32,7 +17,7 @@
3217
* </p>
3318
*
3419
* @author geekidea
35-
* @since 2018-11-30
20+
* @since 2019-07-27
3621
*/
3722
@Data
3823
@EqualsAndHashCode(callSuper = true)
@@ -42,7 +27,7 @@ public class SysLog extends BaseEntity {
4227
private static final long serialVersionUID = 1L;
4328

4429
@ApiModelProperty(value = "主键")
45-
@TableId(value = "log_id", type = IdType.ID_WORKER)
30+
@TableId(value = "log_id", type = IdType.ID_WORKER)
4631
private Long logId;
4732

4833
@ApiModelProperty(value = "类型")
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,40 @@
11
package io.geekidea.springbootplus.system.mapper;
22

3+
import com.baomidou.mybatisplus.core.metadata.IPage;
4+
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
35
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
46
import io.geekidea.springbootplus.system.entity.Ip;
5-
import io.geekidea.springbootplus.system.web.vo.IpVo;
7+
import io.geekidea.springbootplus.system.web.param.IpQueryParam;
8+
import io.geekidea.springbootplus.system.web.vo.IpQueryVo;
9+
import org.apache.ibatis.annotations.Param;
610
import org.springframework.stereotype.Repository;
711

12+
import java.io.Serializable;
13+
814
/**
915
* <p>
1016
* Mapper 接口
1117
* </p>
1218
*
1319
* @author geekidea
14-
* @since 2019-06-20
20+
* @since 2019-07-27
1521
*/
1622
@Repository
1723
public interface IpMapper extends BaseMapper<Ip> {
1824

1925
/**
2026
* 根据ID获取查询对象
21-
* @param ip
27+
* @param id
2228
* @return
2329
*/
24-
IpVo getByIp(String ip);
30+
IpQueryVo getIpById(Serializable id);
2531

32+
/**
33+
* 获取分页对象
34+
* @param page
35+
* @param ipQueryParam
36+
* @return
37+
*/
38+
IPage<IpQueryVo> getIpPageList(@Param("page") Page page, @Param("param") IpQueryParam ipQueryParam);
2639

2740
}

src/main/java/io/geekidea/springbootplus/system/mapper/SysLogMapper.java

+1-17
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
/**
2-
* Copyright 2019-2029 geekidea(https://github.com/geekidea)
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
171
package io.geekidea.springbootplus.system.mapper;
182

193
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -33,7 +17,7 @@
3317
* </p>
3418
*
3519
* @author geekidea
36-
* @since 2018-11-30
20+
* @since 2019-07-27
3721
*/
3822
@Repository
3923
public interface SysLogMapper extends BaseMapper<SysLog> {

0 commit comments

Comments
 (0)