18 changed files with 803 additions and 68 deletions
@ -0,0 +1,164 @@ |
|||||
|
package com.epmet.plugin.power.dto.change; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 合同表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-06 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ChangeRelocationDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 性别 |
||||
|
*/ |
||||
|
private String gender; |
||||
|
|
||||
|
/** |
||||
|
* 年龄 |
||||
|
*/ |
||||
|
private String age; |
||||
|
|
||||
|
/** |
||||
|
* 组织PID |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织名 |
||||
|
*/ |
||||
|
private String agencyName; |
||||
|
|
||||
|
/** |
||||
|
* 房屋小区ID |
||||
|
*/ |
||||
|
private String villageId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋小区 |
||||
|
*/ |
||||
|
private String villageName; |
||||
|
|
||||
|
/** |
||||
|
* 楼号ID |
||||
|
*/ |
||||
|
private String buildId; |
||||
|
|
||||
|
/** |
||||
|
* 楼号 |
||||
|
*/ |
||||
|
private String buildName; |
||||
|
|
||||
|
/** |
||||
|
* 单元ID |
||||
|
*/ |
||||
|
private String unitId; |
||||
|
|
||||
|
/** |
||||
|
* 单元 |
||||
|
*/ |
||||
|
private String unitName; |
||||
|
|
||||
|
/** |
||||
|
* 房屋ID |
||||
|
*/ |
||||
|
private String homeId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋 |
||||
|
*/ |
||||
|
private String homeName; |
||||
|
|
||||
|
/** |
||||
|
* 外迁详细地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 操作类型【客户外out,客户内in】 |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 原房主姓名 |
||||
|
*/ |
||||
|
private String ownerName; |
||||
|
|
||||
|
/** |
||||
|
* 原网格信息 |
||||
|
*/ |
||||
|
private String oldDept; |
||||
|
|
||||
|
/** |
||||
|
* 原房屋信息 |
||||
|
*/ |
||||
|
private String oldAddress; |
||||
|
|
||||
|
/** |
||||
|
* 原房间号 |
||||
|
*/ |
||||
|
private String oldHome; |
||||
|
|
||||
|
/** |
||||
|
* 浅出原因 |
||||
|
*/ |
||||
|
private String reason; |
||||
|
|
||||
|
/** |
||||
|
* 删除标记 0:未删除,1:已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.plugin.power.modules.change.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ExcelUtils; |
||||
|
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.plugin.power.dto.change.ChangeRelocationDTO; |
||||
|
import com.epmet.plugin.power.modules.change.excel.ChangeRelocationExcel; |
||||
|
import com.epmet.plugin.power.modules.change.service.ChangeRelocationService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 合同表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-06 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("changeRelocation") |
||||
|
public class ChangeRelocationController { |
||||
|
|
||||
|
@Autowired |
||||
|
private ChangeRelocationService changeRelocationService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<ChangeRelocationDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<ChangeRelocationDTO> page = changeRelocationService.page(params); |
||||
|
return new Result<PageData<ChangeRelocationDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) |
||||
|
public Result<ChangeRelocationDTO> get(@PathVariable("id") String id){ |
||||
|
ChangeRelocationDTO data = changeRelocationService.get(id); |
||||
|
return new Result<ChangeRelocationDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody ChangeRelocationDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
changeRelocationService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody ChangeRelocationDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
changeRelocationService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "delete", method = {RequestMethod.POST, RequestMethod.DELETE}) |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
changeRelocationService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<ChangeRelocationDTO> list = changeRelocationService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, ChangeRelocationExcel.class); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.plugin.power.modules.change.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.plugin.power.modules.change.entity.ChangeRelocationEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 合同表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-06 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface ChangeRelocationDao extends BaseDao<ChangeRelocationEntity> { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,134 @@ |
|||||
|
package com.epmet.plugin.power.modules.change.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-06 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("pli_change_relocation") |
||||
|
public class ChangeRelocationEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 姓名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 性别 |
||||
|
*/ |
||||
|
private String gender; |
||||
|
|
||||
|
/** |
||||
|
* 年龄 |
||||
|
*/ |
||||
|
private String age; |
||||
|
|
||||
|
/** |
||||
|
* 组织PID |
||||
|
*/ |
||||
|
private String pid; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织名 |
||||
|
*/ |
||||
|
private String agencyName; |
||||
|
|
||||
|
/** |
||||
|
* 房屋小区ID |
||||
|
*/ |
||||
|
private String villageId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋小区 |
||||
|
*/ |
||||
|
private String villageName; |
||||
|
|
||||
|
/** |
||||
|
* 楼号ID |
||||
|
*/ |
||||
|
private String buildId; |
||||
|
|
||||
|
/** |
||||
|
* 楼号 |
||||
|
*/ |
||||
|
private String buildName; |
||||
|
|
||||
|
/** |
||||
|
* 单元ID |
||||
|
*/ |
||||
|
private String unitId; |
||||
|
|
||||
|
/** |
||||
|
* 单元 |
||||
|
*/ |
||||
|
private String unitName; |
||||
|
|
||||
|
/** |
||||
|
* 房屋ID |
||||
|
*/ |
||||
|
private String homeId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋 |
||||
|
*/ |
||||
|
private String homeName; |
||||
|
|
||||
|
/** |
||||
|
* 外迁详细地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 操作类型【客户外out,客户内in】 |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 原房主姓名 |
||||
|
*/ |
||||
|
private String ownerName; |
||||
|
|
||||
|
/** |
||||
|
* 原网格信息 |
||||
|
*/ |
||||
|
private String oldDept; |
||||
|
|
||||
|
/** |
||||
|
* 原房屋信息 |
||||
|
*/ |
||||
|
private String oldAddress; |
||||
|
|
||||
|
/** |
||||
|
* 原房间号 |
||||
|
*/ |
||||
|
private String oldHome; |
||||
|
|
||||
|
/** |
||||
|
* 浅出原因 |
||||
|
*/ |
||||
|
private String reason; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,105 @@ |
|||||
|
package com.epmet.plugin.power.modules.change.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 合同表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-06 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ChangeRelocationExcel { |
||||
|
|
||||
|
@Excel(name = "主键") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "姓名") |
||||
|
private String name; |
||||
|
|
||||
|
@Excel(name = "性别") |
||||
|
private String gender; |
||||
|
|
||||
|
@Excel(name = "年龄") |
||||
|
private String age; |
||||
|
|
||||
|
@Excel(name = "组织PID") |
||||
|
private String pid; |
||||
|
|
||||
|
@Excel(name = "组织ID") |
||||
|
private String agencyId; |
||||
|
|
||||
|
@Excel(name = "组织名") |
||||
|
private String agencyName; |
||||
|
|
||||
|
@Excel(name = "房屋小区ID") |
||||
|
private String villageId; |
||||
|
|
||||
|
@Excel(name = "房屋小区") |
||||
|
private String villageName; |
||||
|
|
||||
|
@Excel(name = "楼号ID") |
||||
|
private String buildId; |
||||
|
|
||||
|
@Excel(name = "楼号") |
||||
|
private String buildName; |
||||
|
|
||||
|
@Excel(name = "单元ID") |
||||
|
private String unitId; |
||||
|
|
||||
|
@Excel(name = "单元") |
||||
|
private String unitName; |
||||
|
|
||||
|
@Excel(name = "房屋ID") |
||||
|
private String homeId; |
||||
|
|
||||
|
@Excel(name = "房屋") |
||||
|
private String homeName; |
||||
|
|
||||
|
@Excel(name = "外迁详细地址") |
||||
|
private String address; |
||||
|
|
||||
|
@Excel(name = "操作类型【客户外out,客户内in】") |
||||
|
private String type; |
||||
|
|
||||
|
@Excel(name = "原房主姓名") |
||||
|
private String ownerName; |
||||
|
|
||||
|
@Excel(name = "原网格信息") |
||||
|
private String oldDept; |
||||
|
|
||||
|
@Excel(name = "原房屋信息") |
||||
|
private String oldAddress; |
||||
|
|
||||
|
@Excel(name = "原房间号") |
||||
|
private String oldHome; |
||||
|
|
||||
|
@Excel(name = "浅出原因") |
||||
|
private String reason; |
||||
|
|
||||
|
@Excel(name = "删除标记 0:未删除,1:已删除") |
||||
|
private String delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
@Excel(name = "客户ID") |
||||
|
private String customerId; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
package com.epmet.plugin.power.modules.change.redis; |
||||
|
|
||||
|
import com.epmet.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 合同表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-06 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class ChangeRelocationRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.plugin.power.modules.change.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.plugin.power.dto.change.ChangeRelocationDTO; |
||||
|
import com.epmet.plugin.power.modules.change.entity.ChangeRelocationEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 合同表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-05-06 |
||||
|
*/ |
||||
|
public interface ChangeRelocationService extends BaseService<ChangeRelocationEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<ChangeRelocationDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-06 |
||||
|
*/ |
||||
|
PageData<ChangeRelocationDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<ChangeRelocationDTO> |
||||
|
* @author generator |
||||
|
* @date 2022-05-06 |
||||
|
*/ |
||||
|
List<ChangeRelocationDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return ChangeRelocationDTO |
||||
|
* @author generator |
||||
|
* @date 2022-05-06 |
||||
|
*/ |
||||
|
ChangeRelocationDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-06 |
||||
|
*/ |
||||
|
void save(ChangeRelocationDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-06 |
||||
|
*/ |
||||
|
void update(ChangeRelocationDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2022-05-06 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
46
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentDeathServiceImpl.java → epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeDeathServiceImpl.java
46
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentDeathServiceImpl.java → epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/change/service/impl/ChangeDeathServiceImpl.java
@ -0,0 +1,87 @@ |
|||||
|
package com.epmet.plugin.power.modules.change.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.plugin.power.modules.change.dao.ChangeRelocationDao; |
||||
|
import com.epmet.plugin.power.dto.change.ChangeRelocationDTO; |
||||
|
import com.epmet.plugin.power.modules.change.entity.ChangeRelocationEntity; |
||||
|
import com.epmet.plugin.power.modules.change.redis.ChangeRelocationRedis; |
||||
|
import com.epmet.plugin.power.modules.change.service.ChangeRelocationService; |
||||
|
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-06 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class ChangeRelocationServiceImpl extends BaseServiceImpl<ChangeRelocationDao, ChangeRelocationEntity> implements ChangeRelocationService { |
||||
|
|
||||
|
@Autowired |
||||
|
private ChangeRelocationRedis changeRelocationRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<ChangeRelocationDTO> page(Map<String, Object> params) { |
||||
|
IPage<ChangeRelocationEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, ChangeRelocationDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<ChangeRelocationDTO> list(Map<String, Object> params) { |
||||
|
List<ChangeRelocationEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, ChangeRelocationDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<ChangeRelocationEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<ChangeRelocationEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public ChangeRelocationDTO get(String id) { |
||||
|
ChangeRelocationEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, ChangeRelocationDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(ChangeRelocationDTO dto) { |
||||
|
ChangeRelocationEntity entity = ConvertUtils.sourceToTarget(dto, ChangeRelocationEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(ChangeRelocationDTO dto) { |
||||
|
ChangeRelocationEntity entity = ConvertUtils.sourceToTarget(dto, ChangeRelocationEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -1,9 +1,9 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?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"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
<mapper namespace="com.epmet.plugin.power.modules.rent.dao.RentDeathDao"> |
<mapper namespace="com.epmet.plugin.power.modules.change.dao.ChangeDeathDao"> |
||||
|
|
||||
<resultMap type="com.epmet.plugin.power.modules.rent.entity.RentDeathEntity" id="rentDeathMap"> |
<resultMap type="com.epmet.plugin.power.modules.change.entity.ChangeDeathEntity" id="rentDeathMap"> |
||||
<result property="id" column="ID"/> |
<result property="id" column="ID"/> |
||||
<result property="userId" column="USER_ID"/> |
<result property="userId" column="USER_ID"/> |
||||
<result property="name" column="NAME"/> |
<result property="name" column="NAME"/> |
||||
@ -0,0 +1,39 @@ |
|||||
|
<?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.plugin.power.modules.change.dao.ChangeRelocationDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.plugin.power.modules.change.entity.ChangeRelocationEntity" id="changeRelocationMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="name" column="NAME"/> |
||||
|
<result property="gender" column="GENDER"/> |
||||
|
<result property="age" column="AGE"/> |
||||
|
<result property="pid" column="PID"/> |
||||
|
<result property="agencyId" column="AGENCY_ID"/> |
||||
|
<result property="agencyName" column="AGENCY_NAME"/> |
||||
|
<result property="villageId" column="VILLAGE_ID"/> |
||||
|
<result property="villageName" column="VILLAGE_NAME"/> |
||||
|
<result property="buildId" column="BUILD_ID"/> |
||||
|
<result property="buildName" column="BUILD_NAME"/> |
||||
|
<result property="unitId" column="UNIT_ID"/> |
||||
|
<result property="unitName" column="UNIT_NAME"/> |
||||
|
<result property="homeId" column="HOME_ID"/> |
||||
|
<result property="homeName" column="HOME_NAME"/> |
||||
|
<result property="address" column="ADDRESS"/> |
||||
|
<result property="type" column="TYPE"/> |
||||
|
<result property="ownerName" column="OWNER_NAME"/> |
||||
|
<result property="oldDept" column="OLD_DEPT"/> |
||||
|
<result property="oldAddress" column="OLD_ADDRESS"/> |
||||
|
<result property="oldHome" column="OLD_HOME"/> |
||||
|
<result property="reason" column="REASON"/> |
||||
|
<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"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
Loading…
Reference in new issue