Skip to content

Commit

Permalink
Merge pull request #5 from geekidea/dev
Browse files Browse the repository at this point in the history
优化代码生成器模板

Former-commit-id: 274377d4ba08f25593116f2d4168f495a6e86c03
  • Loading branch information
springboot-plus authored Jul 27, 2019
2 parents 1b566b9 + 4b797d9 commit 99845ee
Show file tree
Hide file tree
Showing 30 changed files with 275 additions and 489 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.geekidea.springbootplus.common.enums.OrderEnum;
import io.geekidea.springbootplus.common.service.BaseService;
import io.geekidea.springbootplus.common.web.vo.QueryParam;
import io.geekidea.springbootplus.common.web.param.QueryParam;

/**
* @author geekidea
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package io.geekidea.springbootplus.common.web.vo;
package io.geekidea.springbootplus.common.web.param;

import io.geekidea.springbootplus.common.constant.CommonConstant;
import io.swagger.annotations.ApiModel;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

24 changes: 15 additions & 9 deletions src/main/java/io/geekidea/springbootplus/system/entity/Ip.java
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
package io.geekidea.springbootplus.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.geekidea.springbootplus.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
* <p>
*
* </p>
*
* @author geekidea
* @since 2019-06-20
* @since 2019-07-27
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="Ip对象")
@ApiModel(value="Ip对象", description="")
public class Ip extends BaseEntity {

private static final long serialVersionUID = 1L;

private String ipStart;
private String ipStart;

private String ipEnd;
private String ipEnd;

private String area;
private String area;

private String operator;
private String operator;

private Long id;
@TableId(value = "id", type = IdType.AUTO)
private Long id;

private Long ipStartNum;
private Long ipStartNum;

private Long ipEndNum;
private Long ipEndNum;

}
21 changes: 3 additions & 18 deletions src/main/java/io/geekidea/springbootplus/system/entity/SysLog.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
/**
* Copyright 2019-2029 geekidea(https://github.com/geekidea)
*
* 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 io.geekidea.springbootplus.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import io.geekidea.springbootplus.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
Expand All @@ -32,7 +17,7 @@
* </p>
*
* @author geekidea
* @since 2018-11-30
* @since 2019-07-27
*/
@Data
@EqualsAndHashCode(callSuper = true)
Expand All @@ -42,7 +27,7 @@ public class SysLog extends BaseEntity {
private static final long serialVersionUID = 1L;

@ApiModelProperty(value = "主键")
@TableId(value = "log_id", type = IdType.ID_WORKER)
@TableId(value = "log_id", type = IdType.ID_WORKER)
private Long logId;

@ApiModelProperty(value = "类型")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
package io.geekidea.springbootplus.system.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.geekidea.springbootplus.system.entity.Ip;
import io.geekidea.springbootplus.system.web.vo.IpVo;
import io.geekidea.springbootplus.system.web.param.IpQueryParam;
import io.geekidea.springbootplus.system.web.vo.IpQueryVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

/**
* <p>
* Mapper 接口
* </p>
*
* @author geekidea
* @since 2019-06-20
* @since 2019-07-27
*/
@Repository
public interface IpMapper extends BaseMapper<Ip> {

/**
* 根据ID获取查询对象
* @param ip
* @param id
* @return
*/
IpVo getByIp(String ip);
IpQueryVo getIpById(Serializable id);

/**
* 获取分页对象
* @param page
* @param ipQueryParam
* @return
*/
IPage<IpQueryVo> getIpPageList(@Param("page") Page page, @Param("param") IpQueryParam ipQueryParam);

}
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
* Copyright 2019-2029 geekidea(https://github.com/geekidea)
*
* 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 io.geekidea.springbootplus.system.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
Expand All @@ -33,7 +17,7 @@
* </p>
*
* @author geekidea
* @since 2018-11-30
* @since 2019-07-27
*/
@Repository
public interface SysLogMapper extends BaseMapper<SysLog> {
Expand Down
Loading

0 comments on commit 99845ee

Please sign in to comment.