29 changed files with 2065 additions and 20 deletions
			
			
		@ -0,0 +1,15 @@ | 
				
			|||
package com.elink.esua.epdc.constant; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 定制模块图片常量 | 
				
			|||
 * | 
				
			|||
 * @author Liuchuang | 
				
			|||
 * @since 2020/10/22 17:51 | 
				
			|||
 */ | 
				
			|||
public interface CustomImageConstant { | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 一键服务-锦水清风-举报问题 | 
				
			|||
     */ | 
				
			|||
    String IMAGE_TYPE_YJFW_JSQF_JBWT = "yjfw_jsqf_jbwt"; | 
				
			|||
} | 
				
			|||
@ -0,0 +1,86 @@ | 
				
			|||
/** | 
				
			|||
 * 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.dto; | 
				
			|||
 | 
				
			|||
import java.io.Serializable; | 
				
			|||
import java.util.Date; | 
				
			|||
import lombok.Data; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 定制模块图片表 | 
				
			|||
 * | 
				
			|||
 * @author qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
public class CustomImgDTO implements Serializable { | 
				
			|||
 | 
				
			|||
    private static final long serialVersionUID = 1L; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 主键 | 
				
			|||
     */ | 
				
			|||
	private String id; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 引用ID | 
				
			|||
     */ | 
				
			|||
	private String referenceId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 图片地址 | 
				
			|||
     */ | 
				
			|||
	private String imgUrl; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 图片类型 yjfw_jsqf_wyjb:一键服务-锦水清风-我要举报 | 
				
			|||
     */ | 
				
			|||
	private String imgType; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 删除标识 0-否,1-是 | 
				
			|||
     */ | 
				
			|||
	private String delFlag; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 乐观锁 | 
				
			|||
     */ | 
				
			|||
	private Integer revision; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 创建人 | 
				
			|||
     */ | 
				
			|||
	private String createdBy; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 创建时间 | 
				
			|||
     */ | 
				
			|||
	private Date createdTime; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 更新人 | 
				
			|||
     */ | 
				
			|||
	private String updatedBy; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 更新时间 | 
				
			|||
     */ | 
				
			|||
	private Date updatedTime; | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,156 @@ | 
				
			|||
/** | 
				
			|||
 * 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.dto; | 
				
			|||
 | 
				
			|||
import java.io.Serializable; | 
				
			|||
import java.util.Date; | 
				
			|||
import lombok.Data; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 用户举报问题表 | 
				
			|||
 * | 
				
			|||
 * @author qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
public class ReportIssueDTO implements Serializable { | 
				
			|||
 | 
				
			|||
    private static final long serialVersionUID = 1L; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 主键 | 
				
			|||
     */ | 
				
			|||
	private String id; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 问题描述 | 
				
			|||
     */ | 
				
			|||
	private String content; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 举报人 | 
				
			|||
     */ | 
				
			|||
	private String reportUser; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 举报人联系电话 | 
				
			|||
     */ | 
				
			|||
	private String reportUserMobile; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 是否匿名 0-否,1-是 | 
				
			|||
     */ | 
				
			|||
	private String anonymousFlag; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 真实姓名 | 
				
			|||
     */ | 
				
			|||
    private String realName; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户ID | 
				
			|||
     */ | 
				
			|||
	private String userId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户昵称 | 
				
			|||
     */ | 
				
			|||
	private String nickname; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户头像 | 
				
			|||
     */ | 
				
			|||
	private String userFace; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户电话 | 
				
			|||
     */ | 
				
			|||
	private String mobile; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 屏蔽标识 0:未屏蔽,1:已屏蔽 | 
				
			|||
     */ | 
				
			|||
    private String shieldFlag; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 屏蔽原因 | 
				
			|||
     */ | 
				
			|||
    private String shieldReason; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 所属部门ID | 
				
			|||
     */ | 
				
			|||
	private Long deptId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 所属部门名称 | 
				
			|||
     */ | 
				
			|||
	private String deptName; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 父所有部门ID | 
				
			|||
     */ | 
				
			|||
	private String parentDeptIds; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 父所有部门名称 | 
				
			|||
     */ | 
				
			|||
	private String parentDeptNames; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 所有部门ID | 
				
			|||
     */ | 
				
			|||
	private String allDeptIds; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 所有部门名称 | 
				
			|||
     */ | 
				
			|||
	private String allDeptNames; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 删除标识 0-否,1-是 | 
				
			|||
     */ | 
				
			|||
	private String delFlag; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 乐观锁 | 
				
			|||
     */ | 
				
			|||
	private Integer revision; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 创建人 | 
				
			|||
     */ | 
				
			|||
	private String createdBy; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 创建时间 | 
				
			|||
     */ | 
				
			|||
	private Date createdTime; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 更新人 | 
				
			|||
     */ | 
				
			|||
	private String updatedBy; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 更新时间 | 
				
			|||
     */ | 
				
			|||
	private Date updatedTime; | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,39 @@ | 
				
			|||
package com.elink.esua.epdc.dto.form; | 
				
			|||
 | 
				
			|||
import lombok.Data; | 
				
			|||
 | 
				
			|||
import javax.validation.constraints.NotNull; | 
				
			|||
import java.io.Serializable; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 举报问题列表查询参数 | 
				
			|||
 * | 
				
			|||
 * @author Liuchuang | 
				
			|||
 * @since 2020/10/23 10:59 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
public class ReportIssueListFormDTO implements Serializable { | 
				
			|||
    private static final long serialVersionUID = 2105013928295376961L; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 页码 | 
				
			|||
     */ | 
				
			|||
    @NotNull(message = "页码不能为空") | 
				
			|||
    private Integer pageIndex; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 页容量 | 
				
			|||
     */ | 
				
			|||
    @NotNull(message = "页容量不能为空") | 
				
			|||
    private Integer pageSize; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户ID | 
				
			|||
     */ | 
				
			|||
    private String userId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 图片类型 | 
				
			|||
     */ | 
				
			|||
    private String imgType; | 
				
			|||
} | 
				
			|||
@ -0,0 +1,31 @@ | 
				
			|||
package com.elink.esua.epdc.dto.form; | 
				
			|||
 | 
				
			|||
import lombok.Data; | 
				
			|||
 | 
				
			|||
import javax.validation.constraints.NotBlank; | 
				
			|||
import javax.validation.constraints.Size; | 
				
			|||
import java.io.Serializable; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 屏蔽用户举报问题表单 | 
				
			|||
 * | 
				
			|||
 * @author Liuchuang | 
				
			|||
 * @since 2020/10/23 17:01 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
public class ReportIssueShieldFormDTO implements Serializable { | 
				
			|||
    private static final long serialVersionUID = -3686477439903152467L; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 举报问题ID | 
				
			|||
     */ | 
				
			|||
    @NotBlank(message = "记录ID不能为空") | 
				
			|||
    private String id; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 屏蔽原因 | 
				
			|||
     */ | 
				
			|||
    @NotBlank(message = "屏蔽原因不能为空") | 
				
			|||
    @Size(min = 1, max = 500, message = "屏蔽原因不能为空且在100个字以内") | 
				
			|||
    private String shieldReason; | 
				
			|||
} | 
				
			|||
@ -0,0 +1,100 @@ | 
				
			|||
package com.elink.esua.epdc.dto.form; | 
				
			|||
 | 
				
			|||
import lombok.Data; | 
				
			|||
 | 
				
			|||
import javax.validation.constraints.NotBlank; | 
				
			|||
import javax.validation.constraints.Size; | 
				
			|||
import java.io.Serializable; | 
				
			|||
import java.util.List; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 用户举报问题提交表单 | 
				
			|||
 * | 
				
			|||
 * @author Liuchuang | 
				
			|||
 * @since 2020/10/22 17:12 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
public class ReportIssueSubmitFormDTO implements Serializable { | 
				
			|||
    private static final long serialVersionUID = -4805817350334564137L; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 问题描述(500字符以内) | 
				
			|||
     */ | 
				
			|||
    @NotBlank(message = "问题描述不能为空") | 
				
			|||
    @Size(min = 1, max = 500, message = "问题描述不能为空且在500个字以内") | 
				
			|||
    private String content; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 是否匿名(0-否,1-是) | 
				
			|||
     */ | 
				
			|||
    @NotBlank(message = "是否匿名不能为空") | 
				
			|||
    private String anonymousFlag; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 举报人 | 
				
			|||
     */ | 
				
			|||
    @Size(max = 20, message = "举报人信息超出字数限制") | 
				
			|||
    private String reportUser; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 举报人电话 | 
				
			|||
     */ | 
				
			|||
    @Size(max = 20, message = "举报人电话超出字数限制") | 
				
			|||
    private String reportUserMobile; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 图片 | 
				
			|||
     */ | 
				
			|||
    private List<String> images; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户ID | 
				
			|||
     */ | 
				
			|||
    private String userId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 昵称 | 
				
			|||
     */ | 
				
			|||
    private String nickname; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户头像 | 
				
			|||
     */ | 
				
			|||
    private String userFace; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 手机号 | 
				
			|||
     */ | 
				
			|||
    private String mobile; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 真实姓名 | 
				
			|||
     */ | 
				
			|||
    private String realName; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 部门名称 | 
				
			|||
     */ | 
				
			|||
    private String deptName; | 
				
			|||
    /** | 
				
			|||
     * 部门ID | 
				
			|||
     */ | 
				
			|||
    private Long deptId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 父所有部门ID | 
				
			|||
     */ | 
				
			|||
    private String parentDeptIds; | 
				
			|||
    /** | 
				
			|||
     * 父所有部门 | 
				
			|||
     */ | 
				
			|||
    private String parentDeptNames; | 
				
			|||
    /** | 
				
			|||
     * 所有部门ID | 
				
			|||
     */ | 
				
			|||
    private String allDeptIds; | 
				
			|||
    /** | 
				
			|||
     * 所有部门 | 
				
			|||
     */ | 
				
			|||
    private String allDeptNames; | 
				
			|||
} | 
				
			|||
@ -0,0 +1,50 @@ | 
				
			|||
package com.elink.esua.epdc.dto.result; | 
				
			|||
 | 
				
			|||
import lombok.Data; | 
				
			|||
 | 
				
			|||
import java.io.Serializable; | 
				
			|||
import java.util.Date; | 
				
			|||
import java.util.List; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 用户举报问题 | 
				
			|||
 * | 
				
			|||
 * @author Liuchuang | 
				
			|||
 * @since 2020/10/22 17:12 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
public class ReportIssueResultDTO implements Serializable { | 
				
			|||
    private static final long serialVersionUID = -4805817350334564137L; | 
				
			|||
 | 
				
			|||
    private String id; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 问题描述 | 
				
			|||
     */ | 
				
			|||
    private String content; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 是否匿名 | 
				
			|||
     */ | 
				
			|||
    private String anonymousFlag; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 举报人 | 
				
			|||
     */ | 
				
			|||
    private String reportUser; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 举报人电话 | 
				
			|||
     */ | 
				
			|||
    private String reportUserMobile; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 提交时间 | 
				
			|||
     */ | 
				
			|||
    private Date createdTime; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 图片 | 
				
			|||
     */ | 
				
			|||
    private List<String> images; | 
				
			|||
} | 
				
			|||
@ -0,0 +1,71 @@ | 
				
			|||
package com.elink.esua.epdc.modules.reportissue.controller; | 
				
			|||
 | 
				
			|||
import com.elink.esua.epdc.commons.tools.constant.Constant; | 
				
			|||
import com.elink.esua.epdc.commons.tools.utils.Result; | 
				
			|||
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; | 
				
			|||
import com.elink.esua.epdc.dto.form.ReportIssueListFormDTO; | 
				
			|||
import com.elink.esua.epdc.dto.form.ReportIssueSubmitFormDTO; | 
				
			|||
import com.elink.esua.epdc.dto.result.ReportIssueResultDTO; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.service.ReportIssueService; | 
				
			|||
import org.springframework.beans.factory.annotation.Autowired; | 
				
			|||
import org.springframework.http.MediaType; | 
				
			|||
import org.springframework.web.bind.annotation.*; | 
				
			|||
 | 
				
			|||
import java.util.List; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 用户举报问题-移动端接口 | 
				
			|||
 * | 
				
			|||
 * @author qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@RestController | 
				
			|||
@RequestMapping(Constant.EPDC_APP + "reportissue") | 
				
			|||
public class AppReportIssueController { | 
				
			|||
 | 
				
			|||
    @Autowired | 
				
			|||
    private ReportIssueService reportIssueService; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户举报问题提交 | 
				
			|||
     * | 
				
			|||
     * @param formDto 提交信息 | 
				
			|||
     * @return com.elink.esua.epdc.commons.tools.utils.Result | 
				
			|||
     * @author Liuchuang | 
				
			|||
     * @since 2020/10/22 17:28 | 
				
			|||
     */ | 
				
			|||
    @PostMapping("submit") | 
				
			|||
    public Result reportIssueSubmit(@RequestBody ReportIssueSubmitFormDTO formDto) { | 
				
			|||
        ValidatorUtils.validateEntity(formDto); | 
				
			|||
 | 
				
			|||
        return reportIssueService.saveReportIssue(formDto); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户举报问题列表 | 
				
			|||
     * | 
				
			|||
     * @param formDto 参数 | 
				
			|||
     * @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.result.ReportIssueSubmitResultDTO>> | 
				
			|||
     * @author Liuchuang | 
				
			|||
     * @since 2020/10/23 10:06 | 
				
			|||
     */ | 
				
			|||
    @GetMapping("list") | 
				
			|||
    public Result<List<ReportIssueResultDTO>> reportIssueList(@RequestBody ReportIssueListFormDTO formDto) { | 
				
			|||
        List<ReportIssueResultDTO> data = reportIssueService.listReportIssue(formDto); | 
				
			|||
        return new Result<List<ReportIssueResultDTO>>().ok(data); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 举报问题详情 | 
				
			|||
     * | 
				
			|||
     * @param id 记录ID | 
				
			|||
     * @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.ReportIssueResultDTO> | 
				
			|||
     * @author Liuchuang | 
				
			|||
     * @since 2020/10/23 10:39 | 
				
			|||
     */ | 
				
			|||
    @GetMapping("detail/{id}") | 
				
			|||
    public Result<ReportIssueResultDTO> reportIssueDetail(@PathVariable("id") String id) { | 
				
			|||
        ReportIssueResultDTO data = reportIssueService.getReportIssueById(id); | 
				
			|||
        return new Result<ReportIssueResultDTO>().ok(data); | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
@ -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.reportissue.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.CustomImgDTO; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.excel.CustomImgExcel; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.service.CustomImgService; | 
				
			|||
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 qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@RestController | 
				
			|||
@RequestMapping("customimg") | 
				
			|||
public class CustomImgController { | 
				
			|||
     | 
				
			|||
    @Autowired | 
				
			|||
    private CustomImgService customImgService; | 
				
			|||
 | 
				
			|||
    @GetMapping("page") | 
				
			|||
    public Result<PageData<CustomImgDTO>> page(@RequestParam Map<String, Object> params){ | 
				
			|||
        PageData<CustomImgDTO> page = customImgService.page(params); | 
				
			|||
        return new Result<PageData<CustomImgDTO>>().ok(page); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @GetMapping("{id}") | 
				
			|||
    public Result<CustomImgDTO> get(@PathVariable("id") String id){ | 
				
			|||
        CustomImgDTO data = customImgService.get(id); | 
				
			|||
        return new Result<CustomImgDTO>().ok(data); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @PostMapping | 
				
			|||
    public Result save(@RequestBody CustomImgDTO dto){ | 
				
			|||
        //效验数据
 | 
				
			|||
        ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | 
				
			|||
        customImgService.save(dto); | 
				
			|||
        return new Result(); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @PutMapping | 
				
			|||
    public Result update(@RequestBody CustomImgDTO dto){ | 
				
			|||
        //效验数据
 | 
				
			|||
        ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | 
				
			|||
        customImgService.update(dto); | 
				
			|||
        return new Result(); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @DeleteMapping | 
				
			|||
    public Result delete(@RequestBody String[] ids){ | 
				
			|||
        //效验数据
 | 
				
			|||
        AssertUtils.isArrayEmpty(ids, "id"); | 
				
			|||
        customImgService.delete(ids); | 
				
			|||
        return new Result(); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @GetMapping("export") | 
				
			|||
    public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | 
				
			|||
        List<CustomImgDTO> list = customImgService.list(params); | 
				
			|||
        ExcelUtils.exportExcelToTarget(response, null, list, CustomImgExcel.class); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,109 @@ | 
				
			|||
/** | 
				
			|||
 * 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.reportissue.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.ReportIssueDTO; | 
				
			|||
import com.elink.esua.epdc.dto.form.ReportIssueShieldFormDTO; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.excel.ReportIssueExcel; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.service.ReportIssueService; | 
				
			|||
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 qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@RestController | 
				
			|||
@RequestMapping("reportissue") | 
				
			|||
public class ReportIssueController { | 
				
			|||
     | 
				
			|||
    @Autowired | 
				
			|||
    private ReportIssueService reportIssueService; | 
				
			|||
 | 
				
			|||
    @GetMapping("page") | 
				
			|||
    public Result<PageData<ReportIssueDTO>> page(@RequestParam Map<String, Object> params){ | 
				
			|||
        PageData<ReportIssueDTO> page = reportIssueService.page(params); | 
				
			|||
        return new Result<PageData<ReportIssueDTO>>().ok(page); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @GetMapping("{id}") | 
				
			|||
    public Result<ReportIssueDTO> get(@PathVariable("id") String id){ | 
				
			|||
        ReportIssueDTO data = reportIssueService.get(id); | 
				
			|||
        return new Result<ReportIssueDTO>().ok(data); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @PostMapping | 
				
			|||
    public Result save(@RequestBody ReportIssueDTO dto){ | 
				
			|||
        //效验数据
 | 
				
			|||
        ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); | 
				
			|||
        reportIssueService.save(dto); | 
				
			|||
        return new Result(); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @PutMapping | 
				
			|||
    public Result update(@RequestBody ReportIssueDTO dto){ | 
				
			|||
        //效验数据
 | 
				
			|||
        ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); | 
				
			|||
        reportIssueService.update(dto); | 
				
			|||
        return new Result(); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @DeleteMapping | 
				
			|||
    public Result delete(@RequestBody String[] ids){ | 
				
			|||
        //效验数据
 | 
				
			|||
        AssertUtils.isArrayEmpty(ids, "id"); | 
				
			|||
        reportIssueService.delete(ids); | 
				
			|||
        return new Result(); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @GetMapping("export") | 
				
			|||
    public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { | 
				
			|||
        List<ReportIssueDTO> list = reportIssueService.list(params); | 
				
			|||
        ExcelUtils.exportExcelToTarget(response, null, list, ReportIssueExcel.class); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 屏蔽举报问题 | 
				
			|||
     * | 
				
			|||
     * @param formDto 屏蔽提交信息 | 
				
			|||
     * @return com.elink.esua.epdc.commons.tools.utils.Result | 
				
			|||
     * @author Liuchuang | 
				
			|||
     * @since 2020/10/23 16:41 | 
				
			|||
     */ | 
				
			|||
    @PostMapping("shield") | 
				
			|||
    public Result shieldReportIssue(@RequestBody ReportIssueShieldFormDTO formDto) { | 
				
			|||
        ValidatorUtils.validateEntity(formDto); | 
				
			|||
        return reportIssueService.modifyReportIssueShieldFlag(formDto); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -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.reportissue.dao; | 
				
			|||
 | 
				
			|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.entity.CustomImgEntity; | 
				
			|||
import org.apache.ibatis.annotations.Mapper; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 定制模块图片表 | 
				
			|||
 * | 
				
			|||
 * @author qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@Mapper | 
				
			|||
public interface CustomImgDao extends BaseDao<CustomImgEntity> { | 
				
			|||
	 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,57 @@ | 
				
			|||
/** | 
				
			|||
 * 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.reportissue.dao; | 
				
			|||
 | 
				
			|||
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; | 
				
			|||
import com.elink.esua.epdc.dto.form.ReportIssueListFormDTO; | 
				
			|||
import com.elink.esua.epdc.dto.result.ReportIssueResultDTO; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.entity.ReportIssueEntity; | 
				
			|||
import org.apache.ibatis.annotations.Mapper; | 
				
			|||
 | 
				
			|||
import java.util.List; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 用户举报问题表 | 
				
			|||
 * | 
				
			|||
 * @author qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@Mapper | 
				
			|||
public interface ReportIssueDao extends BaseDao<ReportIssueEntity> { | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户举报问题列表 | 
				
			|||
     * | 
				
			|||
     * @param formDto 参数 | 
				
			|||
     * @return java.util.List<com.elink.esua.epdc.dto.result.ReportIssueResultDTO> | 
				
			|||
     * @author Liuchuang | 
				
			|||
     * @since 2020/10/23 11:08 | 
				
			|||
     */ | 
				
			|||
    List<ReportIssueResultDTO> selectListReportIssue(ReportIssueListFormDTO formDto); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 举报问题详情 | 
				
			|||
     * | 
				
			|||
     * @param id 记录ID | 
				
			|||
     * @return com.elink.esua.epdc.dto.result.ReportIssueResultDTO | 
				
			|||
     * @author Liuchuang | 
				
			|||
     * @since 2020/10/23 16:23 | 
				
			|||
     */ | 
				
			|||
    ReportIssueResultDTO selectOneReportIssue(String id); | 
				
			|||
	 | 
				
			|||
} | 
				
			|||
@ -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.reportissue.entity; | 
				
			|||
 | 
				
			|||
import com.baomidou.mybatisplus.annotation.TableName; | 
				
			|||
 | 
				
			|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; | 
				
			|||
import lombok.Data; | 
				
			|||
import lombok.EqualsAndHashCode; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 定制模块图片表 | 
				
			|||
 * | 
				
			|||
 * @author qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
@EqualsAndHashCode(callSuper=false) | 
				
			|||
@TableName("epdc_custom_img") | 
				
			|||
public class CustomImgEntity extends BaseEpdcEntity { | 
				
			|||
 | 
				
			|||
	private static final long serialVersionUID = 1L; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 引用ID | 
				
			|||
     */ | 
				
			|||
	private String referenceId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 图片地址 | 
				
			|||
     */ | 
				
			|||
	private String imgUrl; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 图片类型 yjfw_jsqf_wyjb:一键服务-锦水清风-我要举报 | 
				
			|||
     */ | 
				
			|||
	private String imgType; | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,124 @@ | 
				
			|||
/** | 
				
			|||
 * 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.reportissue.entity; | 
				
			|||
 | 
				
			|||
import com.baomidou.mybatisplus.annotation.TableName; | 
				
			|||
 | 
				
			|||
import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; | 
				
			|||
import lombok.Data; | 
				
			|||
import lombok.EqualsAndHashCode; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 用户举报问题表 | 
				
			|||
 * | 
				
			|||
 * @author qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
@EqualsAndHashCode(callSuper=false) | 
				
			|||
@TableName("epdc_report_issue") | 
				
			|||
public class ReportIssueEntity extends BaseEpdcEntity { | 
				
			|||
 | 
				
			|||
	private static final long serialVersionUID = 1L; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 问题描述 | 
				
			|||
     */ | 
				
			|||
	private String content; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 举报人 | 
				
			|||
     */ | 
				
			|||
	private String reportUser; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 举报人联系电话 | 
				
			|||
     */ | 
				
			|||
	private String reportUserMobile; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 是否匿名 0-否,1-是 | 
				
			|||
     */ | 
				
			|||
	private String anonymousFlag; | 
				
			|||
 | 
				
			|||
	/** | 
				
			|||
	 * 真实姓名 | 
				
			|||
	 */ | 
				
			|||
	private String realName; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户ID | 
				
			|||
     */ | 
				
			|||
	private String userId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户昵称 | 
				
			|||
     */ | 
				
			|||
	private String nickname; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户头像 | 
				
			|||
     */ | 
				
			|||
	private String userFace; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户电话 | 
				
			|||
     */ | 
				
			|||
	private String mobile; | 
				
			|||
 | 
				
			|||
	/** | 
				
			|||
	 * 屏蔽标识 0:未屏蔽,1:已屏蔽 | 
				
			|||
	 */ | 
				
			|||
	private String shieldFlag; | 
				
			|||
 | 
				
			|||
	/** | 
				
			|||
	 * 屏蔽原因 | 
				
			|||
	 */ | 
				
			|||
	private String shieldReason; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 所属部门ID | 
				
			|||
     */ | 
				
			|||
	private Long deptId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 所属部门名称 | 
				
			|||
     */ | 
				
			|||
	private String deptName; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 父所有部门ID | 
				
			|||
     */ | 
				
			|||
	private String parentDeptIds; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 父所有部门名称 | 
				
			|||
     */ | 
				
			|||
	private String parentDeptNames; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 所有部门ID | 
				
			|||
     */ | 
				
			|||
	private String allDeptIds; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 所有部门名称 | 
				
			|||
     */ | 
				
			|||
	private String allDeptNames; | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -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.reportissue.excel; | 
				
			|||
 | 
				
			|||
import cn.afterturn.easypoi.excel.annotation.Excel; | 
				
			|||
import lombok.Data; | 
				
			|||
 | 
				
			|||
import java.util.Date; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 定制模块图片表 | 
				
			|||
 * | 
				
			|||
 * @author qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
public class CustomImgExcel { | 
				
			|||
 | 
				
			|||
    @Excel(name = "主键") | 
				
			|||
    private String id; | 
				
			|||
 | 
				
			|||
    @Excel(name = "引用ID") | 
				
			|||
    private String referenceId; | 
				
			|||
 | 
				
			|||
    @Excel(name = "图片地址") | 
				
			|||
    private String imgUrl; | 
				
			|||
 | 
				
			|||
    @Excel(name = "图片类型 yjfw_jsqf_wyjb:一键服务-锦水清风-我要举报") | 
				
			|||
    private String imgType; | 
				
			|||
 | 
				
			|||
    @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; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -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.reportissue.excel; | 
				
			|||
 | 
				
			|||
import cn.afterturn.easypoi.excel.annotation.Excel; | 
				
			|||
import lombok.Data; | 
				
			|||
 | 
				
			|||
import java.util.Date; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 用户举报问题表 | 
				
			|||
 * | 
				
			|||
 * @author qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
public class ReportIssueExcel { | 
				
			|||
 | 
				
			|||
    @Excel(name = "主键") | 
				
			|||
    private String id; | 
				
			|||
 | 
				
			|||
    @Excel(name = "问题描述") | 
				
			|||
    private String content; | 
				
			|||
 | 
				
			|||
    @Excel(name = "举报人") | 
				
			|||
    private String reportUser; | 
				
			|||
 | 
				
			|||
    @Excel(name = "举报人联系电话") | 
				
			|||
    private String reportUserMobile; | 
				
			|||
 | 
				
			|||
    @Excel(name = "是否匿名 0-否,1-是") | 
				
			|||
    private String anonymousFlag; | 
				
			|||
 | 
				
			|||
    @Excel(name = "真实姓名") | 
				
			|||
    private String realName; | 
				
			|||
 | 
				
			|||
    @Excel(name = "用户ID") | 
				
			|||
    private String userId; | 
				
			|||
 | 
				
			|||
    @Excel(name = "用户昵称") | 
				
			|||
    private String nickname; | 
				
			|||
 | 
				
			|||
    @Excel(name = "用户头像") | 
				
			|||
    private String userFace; | 
				
			|||
 | 
				
			|||
    @Excel(name = "用户电话") | 
				
			|||
    private String mobile; | 
				
			|||
 | 
				
			|||
    @Excel(name = "所属部门ID") | 
				
			|||
    private Long deptId; | 
				
			|||
 | 
				
			|||
    @Excel(name = "所属部门名称") | 
				
			|||
    private String deptName; | 
				
			|||
 | 
				
			|||
    @Excel(name = "父所有部门ID") | 
				
			|||
    private String parentDeptIds; | 
				
			|||
 | 
				
			|||
    @Excel(name = "父所有部门名称") | 
				
			|||
    private String parentDeptNames; | 
				
			|||
 | 
				
			|||
    @Excel(name = "所有部门ID") | 
				
			|||
    private String allDeptIds; | 
				
			|||
 | 
				
			|||
    @Excel(name = "所有部门名称") | 
				
			|||
    private String allDeptNames; | 
				
			|||
 | 
				
			|||
    @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; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -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.reportissue.redis; | 
				
			|||
 | 
				
			|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; | 
				
			|||
import org.springframework.beans.factory.annotation.Autowired; | 
				
			|||
import org.springframework.stereotype.Component; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 定制模块图片表 | 
				
			|||
 * | 
				
			|||
 * @author qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@Component | 
				
			|||
public class CustomImgRedis { | 
				
			|||
    @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.reportissue.redis; | 
				
			|||
 | 
				
			|||
import com.elink.esua.epdc.commons.tools.redis.RedisUtils; | 
				
			|||
import org.springframework.beans.factory.annotation.Autowired; | 
				
			|||
import org.springframework.stereotype.Component; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 用户举报问题表 | 
				
			|||
 * | 
				
			|||
 * @author qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@Component | 
				
			|||
public class ReportIssueRedis { | 
				
			|||
    @Autowired | 
				
			|||
    private RedisUtils redisUtils; | 
				
			|||
 | 
				
			|||
    public void delete(Object[] ids) { | 
				
			|||
 | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    public void set(){ | 
				
			|||
 | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    public String get(String id){ | 
				
			|||
        return null; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,107 @@ | 
				
			|||
/** | 
				
			|||
 * 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.reportissue.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.CustomImgDTO; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.entity.CustomImgEntity; | 
				
			|||
 | 
				
			|||
import java.util.List; | 
				
			|||
import java.util.Map; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 定制模块图片表 | 
				
			|||
 * | 
				
			|||
 * @author qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
public interface CustomImgService extends BaseService<CustomImgEntity> { | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 默认分页 | 
				
			|||
     * | 
				
			|||
     * @param params | 
				
			|||
     * @return PageData<CustomImgDTO> | 
				
			|||
     * @author generator | 
				
			|||
     * @date 2020-10-22 | 
				
			|||
     */ | 
				
			|||
    PageData<CustomImgDTO> page(Map<String, Object> params); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 默认查询 | 
				
			|||
     * | 
				
			|||
     * @param params | 
				
			|||
     * @return java.util.List<CustomImgDTO> | 
				
			|||
     * @author generator | 
				
			|||
     * @date 2020-10-22 | 
				
			|||
     */ | 
				
			|||
    List<CustomImgDTO> list(Map<String, Object> params); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 单条查询 | 
				
			|||
     * | 
				
			|||
     * @param id | 
				
			|||
     * @return CustomImgDTO | 
				
			|||
     * @author generator | 
				
			|||
     * @date 2020-10-22 | 
				
			|||
     */ | 
				
			|||
    CustomImgDTO get(String id); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 默认保存 | 
				
			|||
     * | 
				
			|||
     * @param dto | 
				
			|||
     * @return void | 
				
			|||
     * @author generator | 
				
			|||
     * @date 2020-10-22 | 
				
			|||
     */ | 
				
			|||
    void save(CustomImgDTO dto); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 默认更新 | 
				
			|||
     * | 
				
			|||
     * @param dto | 
				
			|||
     * @return void | 
				
			|||
     * @author generator | 
				
			|||
     * @date 2020-10-22 | 
				
			|||
     */ | 
				
			|||
    void update(CustomImgDTO dto); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 批量删除 | 
				
			|||
     * | 
				
			|||
     * @param ids | 
				
			|||
     * @return void | 
				
			|||
     * @author generator | 
				
			|||
     * @date 2020-10-22 | 
				
			|||
     */ | 
				
			|||
    void delete(String[] ids); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 保存图片 | 
				
			|||
     * | 
				
			|||
     * @param images 图片 | 
				
			|||
     * @param referenceId 引用ID | 
				
			|||
     * @param imgType 图片类型 | 
				
			|||
     * @return boolean | 
				
			|||
     * @author Liuchuang | 
				
			|||
     * @since 2020/10/22 17:42 | 
				
			|||
     */ | 
				
			|||
    boolean saveImages(List<String> images, String referenceId, String imgType); | 
				
			|||
} | 
				
			|||
@ -0,0 +1,140 @@ | 
				
			|||
/** | 
				
			|||
 * 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.reportissue.service; | 
				
			|||
 | 
				
			|||
import com.elink.esua.epdc.commons.mybatis.service.BaseService; | 
				
			|||
import com.elink.esua.epdc.commons.tools.page.PageData; | 
				
			|||
import com.elink.esua.epdc.commons.tools.utils.Result; | 
				
			|||
import com.elink.esua.epdc.dto.ReportIssueDTO; | 
				
			|||
import com.elink.esua.epdc.dto.form.ReportIssueListFormDTO; | 
				
			|||
import com.elink.esua.epdc.dto.form.ReportIssueShieldFormDTO; | 
				
			|||
import com.elink.esua.epdc.dto.form.ReportIssueSubmitFormDTO; | 
				
			|||
import com.elink.esua.epdc.dto.result.ReportIssueResultDTO; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.entity.ReportIssueEntity; | 
				
			|||
 | 
				
			|||
import java.util.List; | 
				
			|||
import java.util.Map; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 用户举报问题表 | 
				
			|||
 * | 
				
			|||
 * @author qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
public interface ReportIssueService extends BaseService<ReportIssueEntity> { | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 默认分页 | 
				
			|||
     * | 
				
			|||
     * @param params | 
				
			|||
     * @return PageData<ReportIssueDTO> | 
				
			|||
     * @author generator | 
				
			|||
     * @date 2020-10-22 | 
				
			|||
     */ | 
				
			|||
    PageData<ReportIssueDTO> page(Map<String, Object> params); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 默认查询 | 
				
			|||
     * | 
				
			|||
     * @param params | 
				
			|||
     * @return java.util.List<ReportIssueDTO> | 
				
			|||
     * @author generator | 
				
			|||
     * @date 2020-10-22 | 
				
			|||
     */ | 
				
			|||
    List<ReportIssueDTO> list(Map<String, Object> params); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 单条查询 | 
				
			|||
     * | 
				
			|||
     * @param id | 
				
			|||
     * @return ReportIssueDTO | 
				
			|||
     * @author generator | 
				
			|||
     * @date 2020-10-22 | 
				
			|||
     */ | 
				
			|||
    ReportIssueDTO get(String id); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 默认保存 | 
				
			|||
     * | 
				
			|||
     * @param dto | 
				
			|||
     * @return void | 
				
			|||
     * @author generator | 
				
			|||
     * @date 2020-10-22 | 
				
			|||
     */ | 
				
			|||
    void save(ReportIssueDTO dto); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 默认更新 | 
				
			|||
     * | 
				
			|||
     * @param dto | 
				
			|||
     * @return void | 
				
			|||
     * @author generator | 
				
			|||
     * @date 2020-10-22 | 
				
			|||
     */ | 
				
			|||
    void update(ReportIssueDTO dto); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 批量删除 | 
				
			|||
     * | 
				
			|||
     * @param ids | 
				
			|||
     * @return void | 
				
			|||
     * @author generator | 
				
			|||
     * @date 2020-10-22 | 
				
			|||
     */ | 
				
			|||
    void delete(String[] ids); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 保存用户举报问题 | 
				
			|||
     * | 
				
			|||
     * @param formDto 提交信息 | 
				
			|||
     * @return com.elink.esua.epdc.commons.tools.utils.Result | 
				
			|||
     * @author Liuchuang | 
				
			|||
     * @since 2020/10/22 17:32 | 
				
			|||
     */ | 
				
			|||
    Result saveReportIssue(ReportIssueSubmitFormDTO formDto); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 用户举报问题列表 | 
				
			|||
     * | 
				
			|||
     * @param formDto 参数 | 
				
			|||
     * @return java.util.List<com.elink.esua.epdc.dto.result.ReportIssueSubmitResultDTO> | 
				
			|||
     * @author Liuchuang | 
				
			|||
     * @since 2020/10/23 10:06 | 
				
			|||
     */ | 
				
			|||
    List<ReportIssueResultDTO> listReportIssue(ReportIssueListFormDTO formDto); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 举报问题详情 | 
				
			|||
     * | 
				
			|||
     * @param id 记录ID | 
				
			|||
     * @return com.elink.esua.epdc.dto.result.ReportIssueResultDTO | 
				
			|||
     * @author Liuchuang | 
				
			|||
     * @since 2020/10/23 10:40 | 
				
			|||
     */ | 
				
			|||
    ReportIssueResultDTO getReportIssueById(String id); | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 屏蔽举报问题 | 
				
			|||
     * | 
				
			|||
     * @param formDto 屏蔽提交信息 | 
				
			|||
     * @return com.elink.esua.epdc.commons.tools.utils.Result | 
				
			|||
     * @author Liuchuang | 
				
			|||
     * @since 2020/10/23 16:41 | 
				
			|||
     */ | 
				
			|||
    Result modifyReportIssueShieldFlag(ReportIssueShieldFormDTO formDto); | 
				
			|||
} | 
				
			|||
@ -0,0 +1,119 @@ | 
				
			|||
/** | 
				
			|||
 * 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.reportissue.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.CustomImgDTO; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.dao.CustomImgDao; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.entity.CustomImgEntity; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.service.CustomImgService; | 
				
			|||
import org.apache.commons.lang3.StringUtils; | 
				
			|||
import org.springframework.stereotype.Service; | 
				
			|||
import org.springframework.transaction.annotation.Transactional; | 
				
			|||
 | 
				
			|||
import java.util.ArrayList; | 
				
			|||
import java.util.Arrays; | 
				
			|||
import java.util.List; | 
				
			|||
import java.util.Map; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 定制模块图片表 | 
				
			|||
 * | 
				
			|||
 * @author qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@Service | 
				
			|||
public class CustomImgServiceImpl extends BaseServiceImpl<CustomImgDao, CustomImgEntity> implements CustomImgService { | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public PageData<CustomImgDTO> page(Map<String, Object> params) { | 
				
			|||
        IPage<CustomImgEntity> page = baseDao.selectPage( | 
				
			|||
                getPage(params, FieldConstant.CREATED_TIME, false), | 
				
			|||
                getWrapper(params) | 
				
			|||
        ); | 
				
			|||
        return getPageData(page, CustomImgDTO.class); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public List<CustomImgDTO> list(Map<String, Object> params) { | 
				
			|||
        List<CustomImgEntity> entityList = baseDao.selectList(getWrapper(params)); | 
				
			|||
 | 
				
			|||
        return ConvertUtils.sourceToTarget(entityList, CustomImgDTO.class); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    private QueryWrapper<CustomImgEntity> getWrapper(Map<String, Object> params){ | 
				
			|||
        String id = (String)params.get(FieldConstant.ID_HUMP); | 
				
			|||
 | 
				
			|||
        QueryWrapper<CustomImgEntity> wrapper = new QueryWrapper<>(); | 
				
			|||
        wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | 
				
			|||
 | 
				
			|||
        return wrapper; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public CustomImgDTO get(String id) { | 
				
			|||
        CustomImgEntity entity = baseDao.selectById(id); | 
				
			|||
        return ConvertUtils.sourceToTarget(entity, CustomImgDTO.class); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    @Transactional(rollbackFor = Exception.class) | 
				
			|||
    public void save(CustomImgDTO dto) { | 
				
			|||
        CustomImgEntity entity = ConvertUtils.sourceToTarget(dto, CustomImgEntity.class); | 
				
			|||
        insert(entity); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    @Transactional(rollbackFor = Exception.class) | 
				
			|||
    public void update(CustomImgDTO dto) { | 
				
			|||
        CustomImgEntity entity = ConvertUtils.sourceToTarget(dto, CustomImgEntity.class); | 
				
			|||
        updateById(entity); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    @Transactional(rollbackFor = Exception.class) | 
				
			|||
    public void delete(String[] ids) { | 
				
			|||
        // 逻辑删除(@TableLogic 注解)
 | 
				
			|||
        baseDao.deleteBatchIds(Arrays.asList(ids)); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    @Transactional(rollbackFor = Exception.class) | 
				
			|||
    public boolean saveImages(List<String> images, String referenceId, String imgType) { | 
				
			|||
        if (images.isEmpty()) { | 
				
			|||
            return true; | 
				
			|||
        } | 
				
			|||
        List<CustomImgEntity> entities = new ArrayList<>(); | 
				
			|||
        for (String imgUrl: | 
				
			|||
                images) { | 
				
			|||
            CustomImgEntity entity = new CustomImgEntity(); | 
				
			|||
            entity.setReferenceId(referenceId); | 
				
			|||
            entity.setImgType(imgType); | 
				
			|||
            entity.setImgUrl(imgUrl); | 
				
			|||
            entities.add(entity); | 
				
			|||
        } | 
				
			|||
 | 
				
			|||
        return insertBatch(entities); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,160 @@ | 
				
			|||
/** | 
				
			|||
 * 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.reportissue.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.constant.NumConstant; | 
				
			|||
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.commons.tools.utils.Result; | 
				
			|||
import com.elink.esua.epdc.constant.CustomImageConstant; | 
				
			|||
import com.elink.esua.epdc.dto.ReportIssueDTO; | 
				
			|||
import com.elink.esua.epdc.dto.form.ReportIssueListFormDTO; | 
				
			|||
import com.elink.esua.epdc.dto.form.ReportIssueShieldFormDTO; | 
				
			|||
import com.elink.esua.epdc.dto.form.ReportIssueSubmitFormDTO; | 
				
			|||
import com.elink.esua.epdc.dto.result.ReportIssueResultDTO; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.dao.ReportIssueDao; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.entity.ReportIssueEntity; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.service.CustomImgService; | 
				
			|||
import com.elink.esua.epdc.modules.reportissue.service.ReportIssueService; | 
				
			|||
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 qu qu@elink-cn.com | 
				
			|||
 * @since v1.0.0 2020-10-22 | 
				
			|||
 */ | 
				
			|||
@Service | 
				
			|||
public class ReportIssueServiceImpl extends BaseServiceImpl<ReportIssueDao, ReportIssueEntity> implements ReportIssueService { | 
				
			|||
 | 
				
			|||
    @Autowired | 
				
			|||
    private CustomImgService customImgService; | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public PageData<ReportIssueDTO> page(Map<String, Object> params) { | 
				
			|||
        // 检索条件
 | 
				
			|||
        String content = (String)params.get("content"); | 
				
			|||
        String anonymousFlag = (String)params.get("anonymousFlag"); | 
				
			|||
        String startTime = (String)params.get("startTime"); | 
				
			|||
        String endTime = (String)params.get("endTime"); | 
				
			|||
 | 
				
			|||
        QueryWrapper<ReportIssueEntity> wrapper = new QueryWrapper<>(); | 
				
			|||
        wrapper.like(StringUtils.isNotBlank(content), "CONTENT", content); | 
				
			|||
        wrapper.eq(StringUtils.isNotBlank(anonymousFlag), "ANONYMOUS_FLAG", anonymousFlag); | 
				
			|||
        wrapper.ge(StringUtils.isNotBlank(startTime), "DATE_FORMAT(CREATED_TIME, '%Y-%m-%d' )", startTime); | 
				
			|||
        wrapper.le(StringUtils.isNotBlank(endTime), "DATE_FORMAT(CREATED_TIME, '%Y-%m-%d' )", endTime); | 
				
			|||
        wrapper.eq(FieldConstant.DEL_FLAG, NumConstant.ZERO_STR); | 
				
			|||
 | 
				
			|||
        IPage<ReportIssueEntity> page = baseDao.selectPage( | 
				
			|||
                getPage(params, FieldConstant.CREATED_TIME, false), | 
				
			|||
                wrapper | 
				
			|||
        ); | 
				
			|||
        return getPageData(page, ReportIssueDTO.class); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public List<ReportIssueDTO> list(Map<String, Object> params) { | 
				
			|||
        List<ReportIssueEntity> entityList = baseDao.selectList(getWrapper(params)); | 
				
			|||
 | 
				
			|||
        return ConvertUtils.sourceToTarget(entityList, ReportIssueDTO.class); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    private QueryWrapper<ReportIssueEntity> getWrapper(Map<String, Object> params){ | 
				
			|||
        String id = (String)params.get(FieldConstant.ID_HUMP); | 
				
			|||
 | 
				
			|||
        QueryWrapper<ReportIssueEntity> wrapper = new QueryWrapper<>(); | 
				
			|||
        wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); | 
				
			|||
 | 
				
			|||
        return wrapper; | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public ReportIssueDTO get(String id) { | 
				
			|||
        ReportIssueEntity entity = baseDao.selectById(id); | 
				
			|||
        return ConvertUtils.sourceToTarget(entity, ReportIssueDTO.class); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    @Transactional(rollbackFor = Exception.class) | 
				
			|||
    public void save(ReportIssueDTO dto) { | 
				
			|||
        ReportIssueEntity entity = ConvertUtils.sourceToTarget(dto, ReportIssueEntity.class); | 
				
			|||
        insert(entity); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    @Transactional(rollbackFor = Exception.class) | 
				
			|||
    public void update(ReportIssueDTO dto) { | 
				
			|||
        ReportIssueEntity entity = ConvertUtils.sourceToTarget(dto, ReportIssueEntity.class); | 
				
			|||
        updateById(entity); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    @Transactional(rollbackFor = Exception.class) | 
				
			|||
    public void delete(String[] ids) { | 
				
			|||
        // 逻辑删除(@TableLogic 注解)
 | 
				
			|||
        baseDao.deleteBatchIds(Arrays.asList(ids)); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    @Transactional(rollbackFor = Exception.class) | 
				
			|||
    public Result saveReportIssue(ReportIssueSubmitFormDTO formDto) { | 
				
			|||
        ReportIssueEntity entity = ConvertUtils.sourceToTarget(formDto, ReportIssueEntity.class); | 
				
			|||
        if (insert(entity)) { | 
				
			|||
            // 保存图片
 | 
				
			|||
            customImgService.saveImages(formDto.getImages(), entity.getId(), CustomImageConstant.IMAGE_TYPE_YJFW_JSQF_JBWT); | 
				
			|||
        } | 
				
			|||
 | 
				
			|||
        return new Result(); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public List<ReportIssueResultDTO> listReportIssue(ReportIssueListFormDTO formDto) { | 
				
			|||
        int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize(); | 
				
			|||
        formDto.setPageIndex(pageIndex); | 
				
			|||
        return baseDao.selectListReportIssue(formDto); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    public ReportIssueResultDTO getReportIssueById(String id) { | 
				
			|||
        return baseDao.selectOneReportIssue(id); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
    @Override | 
				
			|||
    @Transactional(rollbackFor = Exception.class) | 
				
			|||
    public Result modifyReportIssueShieldFlag(ReportIssueShieldFormDTO formDto) { | 
				
			|||
        ReportIssueEntity entity = new ReportIssueEntity(); | 
				
			|||
        entity.setId(formDto.getId()); | 
				
			|||
        entity.setShieldReason(formDto.getShieldReason()); | 
				
			|||
        entity.setShieldFlag(NumConstant.ONE_STR); | 
				
			|||
        updateById(entity); | 
				
			|||
 | 
				
			|||
        return new Result(); | 
				
			|||
    } | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,20 @@ | 
				
			|||
<?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.reportissue.dao.CustomImgDao"> | 
				
			|||
 | 
				
			|||
    <resultMap type="com.elink.esua.epdc.modules.reportissue.entity.CustomImgEntity" id="customImgMap"> | 
				
			|||
        <result property="id" column="ID"/> | 
				
			|||
        <result property="referenceId" column="REFERENCE_ID"/> | 
				
			|||
        <result property="imgUrl" column="IMG_URL"/> | 
				
			|||
        <result property="imgType" column="IMG_TYPE"/> | 
				
			|||
        <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> | 
				
			|||
@ -0,0 +1,64 @@ | 
				
			|||
<?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.reportissue.dao.ReportIssueDao"> | 
				
			|||
 | 
				
			|||
    <resultMap type="com.elink.esua.epdc.dto.result.ReportIssueResultDTO" id="reportIssueMap"> | 
				
			|||
        <result property="id" column="ID"/> | 
				
			|||
        <result property="content" column="CONTENT"/> | 
				
			|||
        <result property="reportUser" column="REPORT_USER"/> | 
				
			|||
        <result property="reportUserMobile" column="REPORT_USER_MOBILE"/> | 
				
			|||
        <result property="anonymousFlag" column="ANONYMOUS_FLAG"/> | 
				
			|||
        <result property="createdTime" column="CREATED_TIME"/> | 
				
			|||
        <collection property="images" ofType="java.lang.String"> | 
				
			|||
            <result property="image" column="IMG_URL"/> | 
				
			|||
        </collection> | 
				
			|||
    </resultMap> | 
				
			|||
 | 
				
			|||
    <select id="selectListReportIssue" resultMap="reportIssueMap"> | 
				
			|||
        SELECT | 
				
			|||
            ri.ID, | 
				
			|||
            ri.CONTENT, | 
				
			|||
            ri.ANONYMOUS_FLAG, | 
				
			|||
            ri.REPORT_USER, | 
				
			|||
            ri.REPORT_USER_MOBILE, | 
				
			|||
            ri.CREATED_TIME, | 
				
			|||
            ci.IMG_URL | 
				
			|||
        FROM | 
				
			|||
            epdc_report_issue ri | 
				
			|||
            LEFT JOIN epdc_custom_img ci ON ci.REFERENCE_ID = ri.ID | 
				
			|||
            AND ci.DEL_FLAG = '0' | 
				
			|||
        WHERE | 
				
			|||
            ri.ID IN ( | 
				
			|||
            SELECT | 
				
			|||
                t.ID | 
				
			|||
            FROM | 
				
			|||
                ( SELECT ID FROM epdc_report_issue WHERE DEL_FLAG = '0' AND SHIELD_FLAG = '0' AND USER_ID = #{userId} ORDER BY CREATED_TIME DESC LIMIT #{pageIndex},#{pageSize} ) t | 
				
			|||
            ) | 
				
			|||
        ORDER BY | 
				
			|||
            ri.CREATED_TIME DESC, | 
				
			|||
            ci.IMG_URL | 
				
			|||
    </select> | 
				
			|||
 | 
				
			|||
    <select id="selectOneReportIssue" resultMap="reportIssueMap"> | 
				
			|||
        SELECT | 
				
			|||
            ri.ID, | 
				
			|||
            ri.CONTENT, | 
				
			|||
            ri.ANONYMOUS_FLAG, | 
				
			|||
            ri.REPORT_USER, | 
				
			|||
            ri.REPORT_USER_MOBILE, | 
				
			|||
            ri.CREATED_TIME, | 
				
			|||
            ci.IMG_URL | 
				
			|||
        FROM | 
				
			|||
            epdc_report_issue ri | 
				
			|||
            LEFT JOIN epdc_custom_img ci ON ci.REFERENCE_ID = ri.ID | 
				
			|||
            AND ci.DEL_FLAG = '0' | 
				
			|||
        WHERE | 
				
			|||
            ri.DEL_FLAG = '0' | 
				
			|||
            AND ri.SHIELD_FLAG = '0' | 
				
			|||
            AND ri.ID = #{id} | 
				
			|||
        ORDER BY | 
				
			|||
            ci.IMG_URL | 
				
			|||
    </select> | 
				
			|||
 | 
				
			|||
</mapper> | 
				
			|||
					Loading…
					
					
				
		Reference in new issue