6 changed files with 0 additions and 390 deletions
@ -1,86 +0,0 @@ |
|||||
/** |
|
||||
* Copyright 2018 人人开源 https://www.renren.io
|
|
||||
* <p> |
|
||||
* This program is free software: you can redistribute it and/or modify |
|
||||
* it under the terms of the GNU General Public License as published by |
|
||||
* the Free Software Foundation, either version 3 of the License, or |
|
||||
* (at your option) any later version. |
|
||||
* <p> |
|
||||
* This program is distributed in the hope that it will be useful, |
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
* GNU General Public License for more details. |
|
||||
* <p> |
|
||||
* You should have received a copy of the GNU General Public License |
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||
*/ |
|
||||
|
|
||||
package com.epmet.dto; |
|
||||
|
|
||||
import java.io.Serializable; |
|
||||
import java.util.Date; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 指南默认分类 |
|
||||
* |
|
||||
* @author generator generator@elink-cn.com |
|
||||
* @since v1.0.0 2021-09-06 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class GuideCategoryDefaultDTO implements Serializable { |
|
||||
|
|
||||
private static final long serialVersionUID = 1L; |
|
||||
|
|
||||
/** |
|
||||
* 主键 |
|
||||
*/ |
|
||||
private String id; |
|
||||
|
|
||||
/** |
|
||||
* 分类名 |
|
||||
*/ |
|
||||
private String categoryName; |
|
||||
|
|
||||
/** |
|
||||
* 排序 |
|
||||
*/ |
|
||||
private Integer sort; |
|
||||
|
|
||||
/** |
|
||||
* 状态 禁用disable 启用enable |
|
||||
*/ |
|
||||
private String status; |
|
||||
|
|
||||
/** |
|
||||
* 删除标识 0未删除、1已删除 |
|
||||
*/ |
|
||||
private String delFlag; |
|
||||
|
|
||||
/** |
|
||||
* 乐观锁 |
|
||||
*/ |
|
||||
private Integer revision; |
|
||||
|
|
||||
/** |
|
||||
* 创建人 |
|
||||
*/ |
|
||||
private String createdBy; |
|
||||
|
|
||||
/** |
|
||||
* 创建时间 |
|
||||
*/ |
|
||||
private Date createdTime; |
|
||||
|
|
||||
/** |
|
||||
* 更新人 |
|
||||
*/ |
|
||||
private String updatedBy; |
|
||||
|
|
||||
/** |
|
||||
* 更新时间 |
|
||||
*/ |
|
||||
private Date updatedTime; |
|
||||
|
|
||||
} |
|
@ -1,33 +0,0 @@ |
|||||
/** |
|
||||
* Copyright 2018 人人开源 https://www.renren.io
|
|
||||
* <p> |
|
||||
* This program is free software: you can redistribute it and/or modify |
|
||||
* it under the terms of the GNU General Public License as published by |
|
||||
* the Free Software Foundation, either version 3 of the License, or |
|
||||
* (at your option) any later version. |
|
||||
* <p> |
|
||||
* This program is distributed in the hope that it will be useful, |
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
* GNU General Public License for more details. |
|
||||
* <p> |
|
||||
* You should have received a copy of the GNU General Public License |
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||
*/ |
|
||||
|
|
||||
package com.epmet.dao; |
|
||||
|
|
||||
import com.epmet.commons.mybatis.dao.BaseDao; |
|
||||
import com.epmet.entity.GuideCategoryDefaultEntity; |
|
||||
import org.apache.ibatis.annotations.Mapper; |
|
||||
|
|
||||
/** |
|
||||
* 指南默认分类 |
|
||||
* |
|
||||
* @author generator generator@elink-cn.com |
|
||||
* @since v1.0.0 2021-09-06 |
|
||||
*/ |
|
||||
@Mapper |
|
||||
public interface GuideCategoryDefaultDao extends BaseDao<GuideCategoryDefaultEntity> { |
|
||||
|
|
||||
} |
|
@ -1,56 +0,0 @@ |
|||||
/** |
|
||||
* Copyright 2018 人人开源 https://www.renren.io
|
|
||||
* <p> |
|
||||
* This program is free software: you can redistribute it and/or modify |
|
||||
* it under the terms of the GNU General Public License as published by |
|
||||
* the Free Software Foundation, either version 3 of the License, or |
|
||||
* (at your option) any later version. |
|
||||
* <p> |
|
||||
* This program is distributed in the hope that it will be useful, |
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
* GNU General Public License for more details. |
|
||||
* <p> |
|
||||
* You should have received a copy of the GNU General Public License |
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||
*/ |
|
||||
|
|
||||
package com.epmet.entity; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
|
||||
|
|
||||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|
||||
import lombok.Data; |
|
||||
import lombok.EqualsAndHashCode; |
|
||||
|
|
||||
import java.util.Date; |
|
||||
|
|
||||
/** |
|
||||
* 指南默认分类 |
|
||||
* |
|
||||
* @author generator generator@elink-cn.com |
|
||||
* @since v1.0.0 2021-09-06 |
|
||||
*/ |
|
||||
@Data |
|
||||
@EqualsAndHashCode(callSuper=false) |
|
||||
@TableName("guide_category_default") |
|
||||
public class GuideCategoryDefaultEntity extends BaseEpmetEntity { |
|
||||
|
|
||||
private static final long serialVersionUID = 1L; |
|
||||
|
|
||||
/** |
|
||||
* 分类名 |
|
||||
*/ |
|
||||
private String categoryName; |
|
||||
|
|
||||
/** |
|
||||
* 排序 |
|
||||
*/ |
|
||||
private Integer sort; |
|
||||
|
|
||||
/** |
|
||||
* 状态 禁用disable 启用enable |
|
||||
*/ |
|
||||
private String status; |
|
||||
|
|
||||
} |
|
@ -1,95 +0,0 @@ |
|||||
/** |
|
||||
* Copyright 2018 人人开源 https://www.renren.io
|
|
||||
* <p> |
|
||||
* This program is free software: you can redistribute it and/or modify |
|
||||
* it under the terms of the GNU General Public License as published by |
|
||||
* the Free Software Foundation, either version 3 of the License, or |
|
||||
* (at your option) any later version. |
|
||||
* <p> |
|
||||
* This program is distributed in the hope that it will be useful, |
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
* GNU General Public License for more details. |
|
||||
* <p> |
|
||||
* You should have received a copy of the GNU General Public License |
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||
*/ |
|
||||
|
|
||||
package com.epmet.service; |
|
||||
|
|
||||
import com.epmet.commons.mybatis.service.BaseService; |
|
||||
import com.epmet.commons.tools.page.PageData; |
|
||||
import com.epmet.dto.GuideCategoryDefaultDTO; |
|
||||
import com.epmet.entity.GuideCategoryDefaultEntity; |
|
||||
|
|
||||
import java.util.List; |
|
||||
import java.util.Map; |
|
||||
|
|
||||
/** |
|
||||
* 指南默认分类 |
|
||||
* |
|
||||
* @author generator generator@elink-cn.com |
|
||||
* @since v1.0.0 2021-09-06 |
|
||||
*/ |
|
||||
public interface GuideCategoryDefaultService extends BaseService<GuideCategoryDefaultEntity> { |
|
||||
|
|
||||
/** |
|
||||
* 默认分页 |
|
||||
* |
|
||||
* @param params |
|
||||
* @return PageData<GuideCategoryDefaultDTO> |
|
||||
* @author generator |
|
||||
* @date 2021-09-06 |
|
||||
*/ |
|
||||
PageData<GuideCategoryDefaultDTO> page(Map<String, Object> params); |
|
||||
|
|
||||
/** |
|
||||
* 默认查询 |
|
||||
* |
|
||||
* @param params |
|
||||
* @return java.util.List<GuideCategoryDefaultDTO> |
|
||||
* @author generator |
|
||||
* @date 2021-09-06 |
|
||||
*/ |
|
||||
List<GuideCategoryDefaultDTO> list(Map<String, Object> params); |
|
||||
|
|
||||
/** |
|
||||
* 单条查询 |
|
||||
* |
|
||||
* @param id |
|
||||
* @return GuideCategoryDefaultDTO |
|
||||
* @author generator |
|
||||
* @date 2021-09-06 |
|
||||
*/ |
|
||||
GuideCategoryDefaultDTO get(String id); |
|
||||
|
|
||||
/** |
|
||||
* 默认保存 |
|
||||
* |
|
||||
* @param dto |
|
||||
* @return void |
|
||||
* @author generator |
|
||||
* @date 2021-09-06 |
|
||||
*/ |
|
||||
void save(GuideCategoryDefaultDTO dto); |
|
||||
|
|
||||
/** |
|
||||
* 默认更新 |
|
||||
* |
|
||||
* @param dto |
|
||||
* @return void |
|
||||
* @author generator |
|
||||
* @date 2021-09-06 |
|
||||
*/ |
|
||||
void update(GuideCategoryDefaultDTO dto); |
|
||||
|
|
||||
/** |
|
||||
* 批量删除 |
|
||||
* |
|
||||
* @param ids |
|
||||
* @return void |
|
||||
* @author generator |
|
||||
* @date 2021-09-06 |
|
||||
*/ |
|
||||
void delete(String[] ids); |
|
||||
} |
|
@ -1,100 +0,0 @@ |
|||||
/** |
|
||||
* Copyright 2018 人人开源 https://www.renren.io
|
|
||||
* <p> |
|
||||
* This program is free software: you can redistribute it and/or modify |
|
||||
* it under the terms of the GNU General Public License as published by |
|
||||
* the Free Software Foundation, either version 3 of the License, or |
|
||||
* (at your option) any later version. |
|
||||
* <p> |
|
||||
* This program is distributed in the hope that it will be useful, |
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
||||
* GNU General Public License for more details. |
|
||||
* <p> |
|
||||
* You should have received a copy of the GNU General Public License |
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||
*/ |
|
||||
|
|
||||
package com.epmet.service.impl; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
||||
import com.epmet.commons.tools.constant.FieldConstant; |
|
||||
import com.epmet.commons.tools.page.PageData; |
|
||||
import com.epmet.commons.tools.utils.ConvertUtils; |
|
||||
import com.epmet.dao.GuideCategoryDefaultDao; |
|
||||
import com.epmet.dto.GuideCategoryDefaultDTO; |
|
||||
import com.epmet.entity.GuideCategoryDefaultEntity; |
|
||||
import com.epmet.service.GuideCategoryDefaultService; |
|
||||
import org.apache.commons.lang3.StringUtils; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
import org.springframework.transaction.annotation.Transactional; |
|
||||
|
|
||||
import java.util.Arrays; |
|
||||
import java.util.List; |
|
||||
import java.util.Map; |
|
||||
|
|
||||
/** |
|
||||
* 指南默认分类 |
|
||||
* |
|
||||
* @author generator generator@elink-cn.com |
|
||||
* @since v1.0.0 2021-09-06 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class GuideCategoryDefaultServiceImpl extends BaseServiceImpl<GuideCategoryDefaultDao, GuideCategoryDefaultEntity> implements GuideCategoryDefaultService { |
|
||||
|
|
||||
|
|
||||
@Override |
|
||||
public PageData<GuideCategoryDefaultDTO> page(Map<String, Object> params) { |
|
||||
IPage<GuideCategoryDefaultEntity> page = baseDao.selectPage( |
|
||||
getPage(params, FieldConstant.CREATED_TIME, false), |
|
||||
getWrapper(params) |
|
||||
); |
|
||||
return getPageData(page, GuideCategoryDefaultDTO.class); |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public List<GuideCategoryDefaultDTO> list(Map<String, Object> params) { |
|
||||
List<GuideCategoryDefaultEntity> entityList = baseDao.selectList(getWrapper(params)); |
|
||||
|
|
||||
return ConvertUtils.sourceToTarget(entityList, GuideCategoryDefaultDTO.class); |
|
||||
} |
|
||||
|
|
||||
private QueryWrapper<GuideCategoryDefaultEntity> getWrapper(Map<String, Object> params){ |
|
||||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|
||||
|
|
||||
QueryWrapper<GuideCategoryDefaultEntity> wrapper = new QueryWrapper<>(); |
|
||||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|
||||
|
|
||||
return wrapper; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public GuideCategoryDefaultDTO get(String id) { |
|
||||
GuideCategoryDefaultEntity entity = baseDao.selectById(id); |
|
||||
return ConvertUtils.sourceToTarget(entity, GuideCategoryDefaultDTO.class); |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
@Transactional(rollbackFor = Exception.class) |
|
||||
public void save(GuideCategoryDefaultDTO dto) { |
|
||||
GuideCategoryDefaultEntity entity = ConvertUtils.sourceToTarget(dto, GuideCategoryDefaultEntity.class); |
|
||||
insert(entity); |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
@Transactional(rollbackFor = Exception.class) |
|
||||
public void update(GuideCategoryDefaultDTO dto) { |
|
||||
GuideCategoryDefaultEntity entity = ConvertUtils.sourceToTarget(dto, GuideCategoryDefaultEntity.class); |
|
||||
updateById(entity); |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
@Transactional(rollbackFor = Exception.class) |
|
||||
public void delete(String[] ids) { |
|
||||
// 逻辑删除(@TableLogic 注解)
|
|
||||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,20 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
|
|
||||
<mapper namespace="com.epmet.dao.GuideCategoryDefaultDao"> |
|
||||
|
|
||||
<resultMap type="com.epmet.entity.GuideCategoryDefaultEntity" id="guideCategoryDefaultMap"> |
|
||||
<result property="id" column="ID"/> |
|
||||
<result property="categoryName" column="CATEGORY_NAME"/> |
|
||||
<result property="sort" column="SORT"/> |
|
||||
<result property="status" column="STATUS"/> |
|
||||
<result property="delFlag" column="DEL_FLAG"/> |
|
||||
<result property="revision" column="REVISION"/> |
|
||||
<result property="createdBy" column="CREATED_BY"/> |
|
||||
<result property="createdTime" column="CREATED_TIME"/> |
|
||||
<result property="updatedBy" column="UPDATED_BY"/> |
|
||||
<result property="updatedTime" column="UPDATED_TIME"/> |
|
||||
</resultMap> |
|
||||
|
|
||||
|
|
||||
</mapper> |
|
Loading…
Reference in new issue