19 changed files with 1120 additions and 2 deletions
@ -0,0 +1,101 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.project.controller; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.AssertUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.elink.esua.epdc.dto.project.PropertyDTO; |
||||
|
import com.elink.esua.epdc.dto.project.result.PropertyDictListResultDTO; |
||||
|
import com.elink.esua.epdc.modules.project.excel.PropertyExcel; |
||||
|
import com.elink.esua.epdc.modules.project.service.PropertyService; |
||||
|
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 zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-05-20 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("property") |
||||
|
public class PropertyController { |
||||
|
|
||||
|
@Autowired |
||||
|
private PropertyService propertyService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<PropertyDTO>> page(@RequestParam Map<String, Object> params) { |
||||
|
PageData<PropertyDTO> page = propertyService.page(params); |
||||
|
return new Result<PageData<PropertyDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("dict") |
||||
|
public Result<List<PropertyDictListResultDTO>> dict() { |
||||
|
List<PropertyDictListResultDTO> page = propertyService.dict(); |
||||
|
return new Result<List<PropertyDictListResultDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<PropertyDTO> get(@PathVariable("id") String id) { |
||||
|
PropertyDTO data = propertyService.get(id); |
||||
|
return new Result<PropertyDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody PropertyDTO dto) { |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
propertyService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody PropertyDTO dto) { |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
propertyService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids) { |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
propertyService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<PropertyDTO> list = propertyService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, PropertyExcel.class); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,94 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.project.controller; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.Result; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.AssertUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.elink.esua.epdc.dto.project.PropertyProjectScoreDTO; |
||||
|
import com.elink.esua.epdc.modules.project.excel.PropertyProjectScoreExcel; |
||||
|
import com.elink.esua.epdc.modules.project.service.PropertyProjectScoreService; |
||||
|
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 zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-05-20 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("propertyprojectscore") |
||||
|
public class PropertyProjectScoreController { |
||||
|
|
||||
|
@Autowired |
||||
|
private PropertyProjectScoreService propertyProjectScoreService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<PropertyProjectScoreDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<PropertyProjectScoreDTO> page = propertyProjectScoreService.page(params); |
||||
|
return new Result<PageData<PropertyProjectScoreDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<PropertyProjectScoreDTO> get(@PathVariable("id") String id){ |
||||
|
PropertyProjectScoreDTO data = propertyProjectScoreService.get(id); |
||||
|
return new Result<PropertyProjectScoreDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody PropertyProjectScoreDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
propertyProjectScoreService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody PropertyProjectScoreDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
propertyProjectScoreService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
propertyProjectScoreService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("export") |
||||
|
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
||||
|
List<PropertyProjectScoreDTO> list = propertyProjectScoreService.list(params); |
||||
|
ExcelUtils.exportExcelToTarget(response, null, list, PropertyProjectScoreExcel.class); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,54 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.project.dao; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
||||
|
import com.elink.esua.epdc.dto.project.result.PropertyDictListResultDTO; |
||||
|
import com.elink.esua.epdc.modules.project.entity.PropertyEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 物业表 |
||||
|
* |
||||
|
* @author zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-05-20 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface PropertyDao extends BaseDao<PropertyEntity> { |
||||
|
/** |
||||
|
* 物业列表 |
||||
|
* |
||||
|
* @return java.util.List<com.elink.esua.epdc.dto.pr.PropertyProjectEntity> |
||||
|
* @params [params] |
||||
|
* @author zhangyuan |
||||
|
* @since 2019/10/11 14:54 |
||||
|
*/ |
||||
|
List<PropertyEntity> selectListOfProperties(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 物业列表 |
||||
|
* |
||||
|
* @return java.util.List<com.elink.esua.epdc.dto.pr.PropertyDictListResultDTO> |
||||
|
* @author zhangyuan |
||||
|
* @since 2019/10/11 14:54 |
||||
|
*/ |
||||
|
List<PropertyDictListResultDTO> selectDictListOfProperties(); |
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.project.dao; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; |
||||
|
import com.elink.esua.epdc.modules.project.entity.PropertyProjectScoreEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 物业项目得分表 |
||||
|
* |
||||
|
* @author zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-05-20 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface PropertyProjectScoreDao extends BaseDao<PropertyProjectScoreEntity> { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,56 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.project.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 物业表 |
||||
|
* |
||||
|
* @author zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-05-20 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("epdc_property") |
||||
|
public class PropertyEntity extends BaseEpdcEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 物业名称 |
||||
|
*/ |
||||
|
private String propertyName; |
||||
|
|
||||
|
/** |
||||
|
* 物业编码 |
||||
|
*/ |
||||
|
private String propertyCode; |
||||
|
|
||||
|
/** |
||||
|
* 是否有效(0-否,1-是) |
||||
|
*/ |
||||
|
private String effectiveFlag; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,62 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.project.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 物业项目得分表 |
||||
|
* |
||||
|
* @author zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-05-20 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("epdc_property_project_score") |
||||
|
public class PropertyProjectScoreEntity extends BaseEpdcEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 物业项目ID |
||||
|
*/ |
||||
|
private String projectId; |
||||
|
|
||||
|
/** |
||||
|
* 物业ID |
||||
|
*/ |
||||
|
private String propertyId; |
||||
|
|
||||
|
/** |
||||
|
* 用户ID |
||||
|
*/ |
||||
|
private String userId; |
||||
|
|
||||
|
/** |
||||
|
* 得分 |
||||
|
*/ |
||||
|
private BigDecimal score; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,65 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.project.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 物业表 |
||||
|
* |
||||
|
* @author zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-05-20 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PropertyExcel { |
||||
|
|
||||
|
@Excel(name = "主键") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "物业名称") |
||||
|
private String propertyName; |
||||
|
|
||||
|
@Excel(name = "物业编码") |
||||
|
private String propertyCode; |
||||
|
|
||||
|
@Excel(name = "是否有效(0-否,1-是)") |
||||
|
private String effectiveFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "删除标记(0-否,1-是)") |
||||
|
private String delFlag; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,69 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.project.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 物业项目得分表 |
||||
|
* |
||||
|
* @author zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-05-20 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class PropertyProjectScoreExcel { |
||||
|
|
||||
|
@Excel(name = "主键") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "物业项目ID") |
||||
|
private String projectId; |
||||
|
|
||||
|
@Excel(name = "物业ID") |
||||
|
private String propertyId; |
||||
|
|
||||
|
@Excel(name = "用户ID") |
||||
|
private String userId; |
||||
|
|
||||
|
@Excel(name = "得分") |
||||
|
private BigDecimal score; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "删除标记(0-否,1-是)") |
||||
|
private String delFlag; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,47 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.project.redis; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 物业项目得分表 |
||||
|
* |
||||
|
* @author zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-05-20 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class PropertyProjectScoreRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,47 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.project.redis; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* 物业表 |
||||
|
* |
||||
|
* @author zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-05-20 |
||||
|
*/ |
||||
|
@Component |
||||
|
public class PropertyRedis { |
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
public void delete(Object[] ids) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void set(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public String get(String id){ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,95 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.project.service; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.dto.project.PropertyProjectScoreDTO; |
||||
|
import com.elink.esua.epdc.modules.project.entity.PropertyProjectScoreEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 物业项目得分表 |
||||
|
* |
||||
|
* @author zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-05-20 |
||||
|
*/ |
||||
|
public interface PropertyProjectScoreService extends BaseService<PropertyProjectScoreEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<PropertyProjectScoreDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-05-20 |
||||
|
*/ |
||||
|
PageData<PropertyProjectScoreDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<PropertyProjectScoreDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-05-20 |
||||
|
*/ |
||||
|
List<PropertyProjectScoreDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return PropertyProjectScoreDTO |
||||
|
* @author generator |
||||
|
* @date 2020-05-20 |
||||
|
*/ |
||||
|
PropertyProjectScoreDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-05-20 |
||||
|
*/ |
||||
|
void save(PropertyProjectScoreDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-05-20 |
||||
|
*/ |
||||
|
void update(PropertyProjectScoreDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-05-20 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,105 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.project.service; |
||||
|
|
||||
|
import com.elink.esua.epdc.commons.mybatis.service.BaseService; |
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.dto.project.PropertyDTO; |
||||
|
import com.elink.esua.epdc.dto.project.result.PropertyDictListResultDTO; |
||||
|
import com.elink.esua.epdc.modules.project.entity.PropertyEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 物业表 |
||||
|
* |
||||
|
* @author zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-05-20 |
||||
|
*/ |
||||
|
public interface PropertyService extends BaseService<PropertyEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<PropertyDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-05-20 |
||||
|
*/ |
||||
|
PageData<PropertyDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 下拉菜单 |
||||
|
* |
||||
|
* @return PageData<PropertyDTO> |
||||
|
* @author zhangyuan |
||||
|
* @date 2020-05-20 |
||||
|
*/ |
||||
|
List<PropertyDictListResultDTO> dict(); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<PropertyDTO> |
||||
|
* @author generator |
||||
|
* @date 2020-05-20 |
||||
|
*/ |
||||
|
List<PropertyDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return PropertyDTO |
||||
|
* @author generator |
||||
|
* @date 2020-05-20 |
||||
|
*/ |
||||
|
PropertyDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-05-20 |
||||
|
*/ |
||||
|
void save(PropertyDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-05-20 |
||||
|
*/ |
||||
|
void update(PropertyDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2020-05-20 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
} |
||||
@ -0,0 +1,104 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.project.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
||||
|
import com.elink.esua.epdc.modules.project.dao.PropertyProjectScoreDao; |
||||
|
import com.elink.esua.epdc.dto.project.PropertyProjectScoreDTO; |
||||
|
import com.elink.esua.epdc.modules.project.entity.PropertyProjectScoreEntity; |
||||
|
import com.elink.esua.epdc.modules.project.redis.PropertyProjectScoreRedis; |
||||
|
import com.elink.esua.epdc.modules.project.service.PropertyProjectScoreService; |
||||
|
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 zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-05-20 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class PropertyProjectScoreServiceImpl extends BaseServiceImpl<PropertyProjectScoreDao, PropertyProjectScoreEntity> implements PropertyProjectScoreService { |
||||
|
|
||||
|
@Autowired |
||||
|
private PropertyProjectScoreRedis propertyProjectScoreRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<PropertyProjectScoreDTO> page(Map<String, Object> params) { |
||||
|
IPage<PropertyProjectScoreEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, PropertyProjectScoreDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<PropertyProjectScoreDTO> list(Map<String, Object> params) { |
||||
|
List<PropertyProjectScoreEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, PropertyProjectScoreDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<PropertyProjectScoreEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<PropertyProjectScoreEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PropertyProjectScoreDTO get(String id) { |
||||
|
PropertyProjectScoreEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, PropertyProjectScoreDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(PropertyProjectScoreDTO dto) { |
||||
|
PropertyProjectScoreEntity entity = ConvertUtils.sourceToTarget(dto, PropertyProjectScoreEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(PropertyProjectScoreDTO dto) { |
||||
|
PropertyProjectScoreEntity entity = ConvertUtils.sourceToTarget(dto, PropertyProjectScoreEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,111 @@ |
|||||
|
/** |
||||
|
* 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.elink.esua.epdc.modules.project.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.elink.esua.epdc.commons.tools.page.PageData; |
||||
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
||||
|
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
||||
|
import com.elink.esua.epdc.dto.project.result.PropertyDictListResultDTO; |
||||
|
import com.elink.esua.epdc.modules.project.dao.PropertyDao; |
||||
|
import com.elink.esua.epdc.dto.project.PropertyDTO; |
||||
|
import com.elink.esua.epdc.modules.project.entity.PropertyEntity; |
||||
|
import com.elink.esua.epdc.modules.project.redis.PropertyRedis; |
||||
|
import com.elink.esua.epdc.modules.project.service.PropertyService; |
||||
|
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 zhangyuan qu@elink-cn.com |
||||
|
* @since v1.0.0 2020-05-20 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class PropertyServiceImpl extends BaseServiceImpl<PropertyDao, PropertyEntity> implements PropertyService { |
||||
|
|
||||
|
@Autowired |
||||
|
private PropertyRedis propertyRedis; |
||||
|
|
||||
|
@Override |
||||
|
public PageData<PropertyDTO> page(Map<String, Object> params) { |
||||
|
IPage<PropertyEntity> page = getPage(params); |
||||
|
List<PropertyEntity> entityList = baseDao.selectListOfProperties(params); |
||||
|
List<PropertyDTO> list = ConvertUtils.sourceToTarget(entityList, PropertyDTO.class); |
||||
|
return new PageData<>(list, page.getTotal()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<PropertyDictListResultDTO> dict() { |
||||
|
List<PropertyDictListResultDTO> entityList = baseDao.selectDictListOfProperties(); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, PropertyDictListResultDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<PropertyDTO> list(Map<String, Object> params) { |
||||
|
List<PropertyEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, PropertyDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<PropertyEntity> getWrapper(Map<String, Object> params) { |
||||
|
String id = (String) params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<PropertyEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PropertyDTO get(String id) { |
||||
|
PropertyEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, PropertyDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(PropertyDTO dto) { |
||||
|
PropertyEntity entity = ConvertUtils.sourceToTarget(dto, PropertyEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(PropertyDTO dto) { |
||||
|
PropertyEntity entity = ConvertUtils.sourceToTarget(dto, PropertyEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,49 @@ |
|||||
|
<?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.elink.esua.epdc.modules.project.dao.PropertyDao"> |
||||
|
|
||||
|
<resultMap type="com.elink.esua.epdc.modules.project.entity.PropertyEntity" id="propertyMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="propertyName" column="PROPERTY_NAME"/> |
||||
|
<result property="propertyCode" column="PROPERTY_CODE"/> |
||||
|
<result property="effectiveFlag" column="EFFECTIVE_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<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> |
||||
|
<sql id="Base_Column_List"> |
||||
|
ID, PROPERTY_NAME, PROPERTY_CODE, EFFECTIVE_FLAG, REVISION, DEL_FLAG, CREATED_BY, CREATED_TIME, |
||||
|
UPDATED_BY, UPDATED_TIME |
||||
|
</sql> |
||||
|
<select id="selectListOfProperties" resultType="com.elink.esua.epdc.modules.project.entity.PropertyEntity"> |
||||
|
SELECT |
||||
|
<include refid="Base_Column_List" /> |
||||
|
FROM |
||||
|
epdc_property ep |
||||
|
WHERE |
||||
|
ep.DEL_FLAG = '0' |
||||
|
<if test="propertyName != null and propertyName != ''"> |
||||
|
AND ep.PROPERTY_NAME like CONCAT( '%', #{propertyName}, '%' ) |
||||
|
</if> |
||||
|
<if test="propertyCode != null and propertyCode != ''"> |
||||
|
AND ep.PROPERTY_CODE like CONCAT( '%', #{propertyCode}, '%' ) |
||||
|
</if> |
||||
|
ORDER BY |
||||
|
ep.CREATED_TIME DESC |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectDictListOfProperties" resultType="com.elink.esua.epdc.dto.project.result.PropertyDictListResultDTO"> |
||||
|
SELECT |
||||
|
ID AS dictValue, PROPERTY_NAME AS dictName |
||||
|
FROM |
||||
|
epdc_property ep |
||||
|
WHERE |
||||
|
ep.DEL_FLAG = '0' |
||||
|
ORDER BY |
||||
|
ep.CREATED_TIME DESC |
||||
|
</select> |
||||
|
</mapper> |
||||
@ -0,0 +1,21 @@ |
|||||
|
<?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.elink.esua.epdc.modules.project.dao.PropertyProjectScoreDao"> |
||||
|
|
||||
|
<resultMap type="com.elink.esua.epdc.modules.project.entity.PropertyProjectScoreEntity" id="propertyProjectScoreMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="projectId" column="PROJECT_ID"/> |
||||
|
<result property="propertyId" column="PROPERTY_ID"/> |
||||
|
<result property="userId" column="USER_ID"/> |
||||
|
<result property="score" column="SCORE"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<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