14 changed files with 812 additions and 0 deletions
@ -0,0 +1,79 @@ |
|||||
|
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 2022-05-09 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcHouseChangeDetailDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* ID |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 记录ID |
||||
|
*/ |
||||
|
private String recordId; |
||||
|
|
||||
|
/** |
||||
|
* 变更类型,HOUSE_TYPE:房屋类型,PURPOSE:房屋用途,RENT_FLAG:房屋状态,OWNER_NAME:房主姓名,OWNER_PHONE:房主电话,OWNER_ID_CARD:房主身份证 |
||||
|
*/ |
||||
|
private String changeType; |
||||
|
|
||||
|
/** |
||||
|
* 变更名字,HOUSE_TYPE:房屋类型,PURPOSE:房屋用途,RENT_FLAG:房屋状态,OWNER_NAME:房主姓名,OWNER_PHONE:房主电话,OWNER_ID_CARD:房主身份证 |
||||
|
*/ |
||||
|
private String changeName; |
||||
|
|
||||
|
/** |
||||
|
* 变更前 |
||||
|
*/ |
||||
|
private String changeBefore; |
||||
|
|
||||
|
/** |
||||
|
* 变更后 |
||||
|
*/ |
||||
|
private String changeAfter; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,104 @@ |
|||||
|
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 2022-05-09 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcHouseChangeRecordDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* ID |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 网格ID |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 小区ID |
||||
|
*/ |
||||
|
private String neighborhoodId; |
||||
|
|
||||
|
/** |
||||
|
* 楼栋ID |
||||
|
*/ |
||||
|
private String buildingId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋ID |
||||
|
*/ |
||||
|
private String houseId; |
||||
|
|
||||
|
/** |
||||
|
* 变更前 |
||||
|
*/ |
||||
|
private String changeBefore; |
||||
|
|
||||
|
/** |
||||
|
* 变更后 |
||||
|
*/ |
||||
|
private String changeAfter; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID的上级 |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID的所有上级 |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,70 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.dto.IcHouseChangeDetailDTO; |
||||
|
import com.epmet.service.IcHouseChangeDetailService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 房屋变更详情表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-09 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("icHouseChangeDetail") |
||||
|
public class IcHouseChangeDetailController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcHouseChangeDetailService icHouseChangeDetailService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<IcHouseChangeDetailDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<IcHouseChangeDetailDTO> page = icHouseChangeDetailService.page(params); |
||||
|
return new Result<PageData<IcHouseChangeDetailDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<IcHouseChangeDetailDTO> get(@PathVariable("id") String id){ |
||||
|
IcHouseChangeDetailDTO data = icHouseChangeDetailService.get(id); |
||||
|
return new Result<IcHouseChangeDetailDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody IcHouseChangeDetailDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
icHouseChangeDetailService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody IcHouseChangeDetailDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
icHouseChangeDetailService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
icHouseChangeDetailService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,70 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.dto.IcHouseChangeRecordDTO; |
||||
|
import com.epmet.service.IcHouseChangeRecordService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 房屋变更记录表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-09 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("icHouseChangeRecord") |
||||
|
public class IcHouseChangeRecordController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcHouseChangeRecordService icHouseChangeRecordService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<IcHouseChangeRecordDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<IcHouseChangeRecordDTO> page = icHouseChangeRecordService.page(params); |
||||
|
return new Result<PageData<IcHouseChangeRecordDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
||||
|
public Result<IcHouseChangeRecordDTO> get(@PathVariable("id") String id){ |
||||
|
IcHouseChangeRecordDTO data = icHouseChangeRecordService.get(id); |
||||
|
return new Result<IcHouseChangeRecordDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody IcHouseChangeRecordDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
icHouseChangeRecordService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody IcHouseChangeRecordDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
icHouseChangeRecordService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
icHouseChangeRecordService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IcHouseChangeDetailEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 房屋变更详情表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-09 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcHouseChangeDetailDao extends BaseDao<IcHouseChangeDetailEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IcHouseChangeRecordEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 房屋变更记录表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-09 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcHouseChangeRecordDao extends BaseDao<IcHouseChangeRecordEntity> { |
||||
|
|
||||
|
} |
@ -0,0 +1,49 @@ |
|||||
|
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 2022-05-09 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_house_change_detail") |
||||
|
public class IcHouseChangeDetailEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 记录ID |
||||
|
*/ |
||||
|
private String recordId; |
||||
|
|
||||
|
/** |
||||
|
* 变更类型,HOUSE_TYPE:房屋类型,PURPOSE:房屋用途,RENT_FLAG:房屋状态,OWNER_NAME:房主姓名,OWNER_PHONE:房主电话,OWNER_ID_CARD:房主身份证 |
||||
|
*/ |
||||
|
private String changeType; |
||||
|
|
||||
|
/** |
||||
|
* 变更名字,HOUSE_TYPE:房屋类型,PURPOSE:房屋用途,RENT_FLAG:房屋状态,OWNER_NAME:房主姓名,OWNER_PHONE:房主电话,OWNER_ID_CARD:房主身份证 |
||||
|
*/ |
||||
|
private String changeName; |
||||
|
|
||||
|
/** |
||||
|
* 变更前 |
||||
|
*/ |
||||
|
private String changeBefore; |
||||
|
|
||||
|
/** |
||||
|
* 变更后 |
||||
|
*/ |
||||
|
private String changeAfter; |
||||
|
|
||||
|
} |
@ -0,0 +1,74 @@ |
|||||
|
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 2022-05-09 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_house_change_record") |
||||
|
public class IcHouseChangeRecordEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 网格ID |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 小区ID |
||||
|
*/ |
||||
|
private String neighborhoodId; |
||||
|
|
||||
|
/** |
||||
|
* 楼栋ID |
||||
|
*/ |
||||
|
private String buildingId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋ID |
||||
|
*/ |
||||
|
private String houseId; |
||||
|
|
||||
|
/** |
||||
|
* 变更前 |
||||
|
*/ |
||||
|
private String changeBefore; |
||||
|
|
||||
|
/** |
||||
|
* 变更后 |
||||
|
*/ |
||||
|
private String changeAfter; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID的上级 |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID的所有上级 |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.IcHouseChangeDetailDTO; |
||||
|
import com.epmet.entity.IcHouseChangeDetailEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 房屋变更详情表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-09 |
||||
|
*/ |
||||
|
public interface IcHouseChangeDetailService extends BaseService<IcHouseChangeDetailEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IcHouseChangeDetailDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-09 |
||||
|
*/ |
||||
|
PageData<IcHouseChangeDetailDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IcHouseChangeDetailDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-09 |
||||
|
*/ |
||||
|
List<IcHouseChangeDetailDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcHouseChangeDetailDTO |
||||
|
* @author generator |
||||
|
* @date 2022-05-09 |
||||
|
*/ |
||||
|
IcHouseChangeDetailDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-09 |
||||
|
*/ |
||||
|
void save(IcHouseChangeDetailDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-09 |
||||
|
*/ |
||||
|
void update(IcHouseChangeDetailDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-09 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.IcHouseChangeRecordDTO; |
||||
|
import com.epmet.entity.IcHouseChangeRecordEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 房屋变更记录表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-09 |
||||
|
*/ |
||||
|
public interface IcHouseChangeRecordService extends BaseService<IcHouseChangeRecordEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IcHouseChangeRecordDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-09 |
||||
|
*/ |
||||
|
PageData<IcHouseChangeRecordDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IcHouseChangeRecordDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-09 |
||||
|
*/ |
||||
|
List<IcHouseChangeRecordDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcHouseChangeRecordDTO |
||||
|
* @author generator |
||||
|
* @date 2022-05-09 |
||||
|
*/ |
||||
|
IcHouseChangeRecordDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-09 |
||||
|
*/ |
||||
|
void save(IcHouseChangeRecordDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-09 |
||||
|
*/ |
||||
|
void update(IcHouseChangeRecordDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-09 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
@ -0,0 +1,83 @@ |
|||||
|
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.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.dao.IcHouseChangeDetailDao; |
||||
|
import com.epmet.dto.IcHouseChangeDetailDTO; |
||||
|
import com.epmet.entity.IcHouseChangeDetailEntity; |
||||
|
import com.epmet.service.IcHouseChangeDetailService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
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 2022-05-09 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcHouseChangeDetailServiceImpl extends BaseServiceImpl<IcHouseChangeDetailDao, IcHouseChangeDetailEntity> implements IcHouseChangeDetailService { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcHouseChangeDetailDTO> page(Map<String, Object> params) { |
||||
|
IPage<IcHouseChangeDetailEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, IcHouseChangeDetailDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcHouseChangeDetailDTO> list(Map<String, Object> params) { |
||||
|
List<IcHouseChangeDetailEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, IcHouseChangeDetailDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IcHouseChangeDetailEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IcHouseChangeDetailEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcHouseChangeDetailDTO get(String id) { |
||||
|
IcHouseChangeDetailEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IcHouseChangeDetailDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcHouseChangeDetailDTO dto) { |
||||
|
IcHouseChangeDetailEntity entity = ConvertUtils.sourceToTarget(dto, IcHouseChangeDetailEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IcHouseChangeDetailDTO dto) { |
||||
|
IcHouseChangeDetailEntity entity = ConvertUtils.sourceToTarget(dto, IcHouseChangeDetailEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,83 @@ |
|||||
|
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.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.dao.IcHouseChangeRecordDao; |
||||
|
import com.epmet.dto.IcHouseChangeRecordDTO; |
||||
|
import com.epmet.entity.IcHouseChangeRecordEntity; |
||||
|
import com.epmet.service.IcHouseChangeRecordService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
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 2022-05-09 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcHouseChangeRecordServiceImpl extends BaseServiceImpl<IcHouseChangeRecordDao, IcHouseChangeRecordEntity> implements IcHouseChangeRecordService { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcHouseChangeRecordDTO> page(Map<String, Object> params) { |
||||
|
IPage<IcHouseChangeRecordEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, IcHouseChangeRecordDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcHouseChangeRecordDTO> list(Map<String, Object> params) { |
||||
|
List<IcHouseChangeRecordEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, IcHouseChangeRecordDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IcHouseChangeRecordEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IcHouseChangeRecordEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcHouseChangeRecordDTO get(String id) { |
||||
|
IcHouseChangeRecordEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IcHouseChangeRecordDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcHouseChangeRecordDTO dto) { |
||||
|
IcHouseChangeRecordEntity entity = ConvertUtils.sourceToTarget(dto, IcHouseChangeRecordEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IcHouseChangeRecordDTO dto) { |
||||
|
IcHouseChangeRecordEntity entity = ConvertUtils.sourceToTarget(dto, IcHouseChangeRecordEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
<?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.IcHouseChangeDetailDao"> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,6 @@ |
|||||
|
<?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.IcHouseChangeRecordDao"> |
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue