Browse Source

【内容审核】-【初心互助-已报名活动-我要打卡】-(王童)-2020/07/08

feature/dangjian
Jackwang 5 years ago
parent
commit
a4f0748f6f
  1. 6
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-client/src/main/java/com/elink/esua/epdc/dto/CheckCodeDTO.java
  2. 35
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-client/src/main/java/com/elink/esua/epdc/dto/CheckRecordsDTO.java
  3. 86
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-client/src/main/java/com/elink/esua/epdc/dto/CheckRecordsImgsDTO.java
  4. 2
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-client/src/main/java/com/elink/esua/epdc/dto/CheckResultDTO.java
  5. 31
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-client/src/main/java/com/elink/esua/epdc/dto/ViolationsRecordsDTO.java
  6. 87
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-client/src/main/java/com/elink/esua/epdc/dto/ViolationsRecordsImgsDTO.java
  7. 33
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/dao/CheckRecordsImgsDao.java
  8. 33
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/dao/ViolationsRecordsImgsDao.java
  9. 7
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/entity/CheckCodeEntity.java
  10. 5
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/entity/CheckRecordsEntity.java
  11. 58
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/entity/CheckRecordsImgsEntity.java
  12. 2
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/entity/CheckResultEntity.java
  13. 2
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/entity/ViolationsRecordsEntity.java
  14. 58
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/entity/ViolationsRecordsImgsEntity.java
  15. 65
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/excel/CheckRecordsImgsExcel.java
  16. 65
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/excel/ViolationsRecordsImgsExcel.java
  17. 47
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/redis/CheckRecordsImgsRedis.java
  18. 47
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/redis/ViolationsRecordsImgsRedis.java
  19. 106
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/CheckRecordsImgsService.java
  20. 105
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/ViolationsRecordsImgsService.java
  21. 123
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/impl/CheckRecordsImgsServiceImpl.java
  22. 123
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/impl/ViolationsRecordsImgsServiceImpl.java
  23. 15
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/impl/ViolationsRecordsServiceImpl.java
  24. 9
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/resources/mapper/CheckRecordsDao.xml
  25. 20
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/resources/mapper/CheckRecordsImgsDao.xml
  26. 9
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/resources/mapper/ViolationsRecordsDao.xml
  27. 20
      esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/resources/mapper/ViolationsRecordsImgsDao.xml
  28. 44
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java

6
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-client/src/main/java/com/elink/esua/epdc/dto/CheckCodeDTO.java

@ -26,7 +26,7 @@ import lombok.Data;
* 检测编码信息表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-07-03
* @since v1.0.0 2020-07-08
*/
@Data
public class CheckCodeDTO implements Serializable {
@ -36,10 +36,10 @@ public class CheckCodeDTO implements Serializable {
/**
* ID
*/
private String id;
private Integer id;
/**
* 类型1文字2图片
* 类型content文本内容module功能模块
*/
private String type;

35
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-client/src/main/java/com/elink/esua/epdc/dto/CheckRecordsDTO.java

@ -17,17 +17,17 @@
package com.elink.esua.epdc.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 待审核记录
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-07-03
* @since v1.0.0 2020-07-08
*/
@Data
public class CheckRecordsDTO implements Serializable {
@ -59,11 +59,6 @@ public class CheckRecordsDTO implements Serializable {
*/
private String relationId;
/**
* 类型1文字2图片
*/
private Integer type;
/**
* 功能模块
*/
@ -92,32 +87,12 @@ public class CheckRecordsDTO implements Serializable {
/**
* 审核状态
*/
private String suggestionText;
/**
* 图片鉴黄审核状态
*/
private String suggestionImgPorn;
/**
* 图片暴恐涉政审核状态
*/
private String suggestionImgTerrorism;
private String suggestion;
/**
* 检测结果分类
*/
private String labelText;
/**
* 图片鉴黄
*/
private String labelImgPorn;
/**
* 图片暴恐涉政识别
*/
private String labelImgTerrorism;
private String label;
/**
* 结果属于当前分类的概率取值范围0.00~100.00值越高表示越有可能属于当前分类

86
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-client/src/main/java/com/elink/esua/epdc/dto/CheckRecordsImgsDTO.java

@ -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-07-08
*/
@Data
public class CheckRecordsImgsDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 引用ID
*/
private String referenceId;
/**
* 图片地址
*/
private String url;
/**
* 缩略图
*/
private String thumbnail;
/**
* 排序
*/
private Integer sort;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

2
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-client/src/main/java/com/elink/esua/epdc/dto/CheckResultDTO.java

@ -26,7 +26,7 @@ import lombok.Data;
* 审核结果
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-07-03
* @since v1.0.0 2020-07-08
*/
@Data
public class CheckResultDTO implements Serializable {

31
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-client/src/main/java/com/elink/esua/epdc/dto/ViolationsRecordsDTO.java

@ -27,7 +27,7 @@ import java.math.BigDecimal;
* 违规记录表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-07-03
* @since v1.0.0 2020-07-08
*/
@Data
public class ViolationsRecordsDTO implements Serializable {
@ -59,11 +59,6 @@ public class ViolationsRecordsDTO implements Serializable {
*/
private String relationId;
/**
* 类型1文字2图片
*/
private Integer type;
/**
* 判定方式:1系统2人工
*/
@ -97,32 +92,12 @@ public class ViolationsRecordsDTO implements Serializable {
/**
* 审核状态
*/
private String suggestionText;
/**
* 图片鉴黄审核状态
*/
private String suggestionImgPorn;
/**
* 图片暴恐涉政审核状态
*/
private String suggestionImgTerrorism;
private String suggestion;
/**
* 检测结果分类
*/
private String labelText;
/**
* 图片鉴黄
*/
private String labelImgPorn;
/**
* 图片暴恐涉政识别
*/
private String labelImgTerrorism;
private String label;
/**
* 结果属于当前分类的概率取值范围0.00~100.00值越高表示越有可能属于当前分类

87
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-client/src/main/java/com/elink/esua/epdc/dto/ViolationsRecordsImgsDTO.java

@ -0,0 +1,87 @@
/**
* 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 lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 违规记录图片信息
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-07-08
*/
@Data
public class ViolationsRecordsImgsDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 引用ID
*/
private String referenceId;
/**
* 图片地址
*/
private String url;
/**
* 缩略图
*/
private String thumbnail;
/**
* 排序
*/
private Integer sort;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

33
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/dao/CheckRecordsImgsDao.java

@ -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.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.entity.CheckRecordsImgsEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 待审核图片信息
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-07-08
*/
@Mapper
public interface CheckRecordsImgsDao extends BaseDao<CheckRecordsImgsEntity> {
}

33
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/dao/ViolationsRecordsImgsDao.java

@ -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.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.entity.ViolationsRecordsImgsEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 违规记录图片信息
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-07-08
*/
@Mapper
public interface ViolationsRecordsImgsDao extends BaseDao<ViolationsRecordsImgsEntity> {
}

7
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/entity/CheckCodeEntity.java

@ -18,15 +18,18 @@
package com.elink.esua.epdc.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 qu qu@elink-cn.com
* @since v1.0.0 2020-07-03
* @since v1.0.0 2020-07-08
*/
@Data
@EqualsAndHashCode(callSuper=false)
@ -36,7 +39,7 @@ public class CheckCodeEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 类型1文字2图片
* 类型content文本内容module功能模块
*/
private String type;

5
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/entity/CheckRecordsEntity.java

@ -18,17 +18,19 @@
package com.elink.esua.epdc.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 qu qu@elink-cn.com
* @since v1.0.0 2020-07-03
* @since v1.0.0 2020-07-08
*/
@Data
@EqualsAndHashCode(callSuper=false)
@ -91,6 +93,7 @@ public class CheckRecordsEntity extends BaseEpdcEntity {
* 检测结果分类
*/
private String label;
/**
* 结果属于当前分类的概率取值范围0.00~100.00值越高表示越有可能属于当前分类
*/

58
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/entity/CheckRecordsImgsEntity.java

@ -0,0 +1,58 @@
/**
* 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.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-07-08
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_check_records_imgs")
public class CheckRecordsImgsEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 引用ID
*/
private String referenceId;
/**
* 图片地址
*/
private String url;
/**
* 缩略图
*/
private String thumbnail;
/**
* 排序
*/
private Integer sort;
}

2
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/entity/CheckResultEntity.java

@ -29,7 +29,7 @@ import java.util.Date;
* 审核结果
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-07-03
* @since v1.0.0 2020-07-08
*/
@Data
@EqualsAndHashCode(callSuper=false)

2
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/entity/ViolationsRecordsEntity.java

@ -28,7 +28,7 @@ import java.math.BigDecimal;
* 违规记录表
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-07-03
* @since v1.0.0 2020-07-08
*/
@Data
@EqualsAndHashCode(callSuper=false)

58
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/entity/ViolationsRecordsImgsEntity.java

@ -0,0 +1,58 @@
/**
* 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.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-07-08
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("epdc_violations_records_imgs")
public class ViolationsRecordsImgsEntity extends BaseEpdcEntity {
private static final long serialVersionUID = 1L;
/**
* 引用ID
*/
private String referenceId;
/**
* 图片地址
*/
private String url;
/**
* 缩略图
*/
private String thumbnail;
/**
* 排序
*/
private Integer sort;
}

65
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/excel/CheckRecordsImgsExcel.java

@ -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.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-07-08
*/
@Data
public class CheckRecordsImgsExcel {
@Excel(name = "ID")
private String id;
@Excel(name = "引用ID")
private String referenceId;
@Excel(name = "图片地址")
private String url;
@Excel(name = "缩略图")
private String thumbnail;
@Excel(name = "排序")
private Integer sort;
@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;
}

65
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/excel/ViolationsRecordsImgsExcel.java

@ -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.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-07-08
*/
@Data
public class ViolationsRecordsImgsExcel {
@Excel(name = "ID")
private String id;
@Excel(name = "引用ID")
private String referenceId;
@Excel(name = "图片地址")
private String url;
@Excel(name = "缩略图")
private String thumbnail;
@Excel(name = "排序")
private Integer sort;
@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;
}

47
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/redis/CheckRecordsImgsRedis.java

@ -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.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-07-08
*/
@Component
public class CheckRecordsImgsRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/redis/ViolationsRecordsImgsRedis.java

@ -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.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-07-08
*/
@Component
public class ViolationsRecordsImgsRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

106
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/CheckRecordsImgsService.java

@ -0,0 +1,106 @@
/**
* 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.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.CheckRecordsImgsDTO;
import com.elink.esua.epdc.entity.CheckRecordsImgsEntity;
import java.util.List;
import java.util.Map;
/**
* 待审核图片信息
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-07-08
*/
public interface CheckRecordsImgsService extends BaseService<CheckRecordsImgsEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<CheckRecordsImgsDTO>
* @author generator
* @date 2020-07-08
*/
PageData<CheckRecordsImgsDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<CheckRecordsImgsDTO>
* @author generator
* @date 2020-07-08
*/
List<CheckRecordsImgsDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return CheckRecordsImgsDTO
* @author generator
* @date 2020-07-08
*/
CheckRecordsImgsDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-07-08
*/
void save(CheckRecordsImgsDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-07-08
*/
void update(CheckRecordsImgsDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-07-08
*/
void delete(String[] ids);
/**
* @describe: 插入待审核记录
* @author wangtong
* @date 2020/7/8 10:01
* @param [imgUrls, id]
* @return com.elink.esua.epdc.commons.tools.utils.Result
*/
Result insertImages(List<String> imgUrls, String id);
}

105
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/ViolationsRecordsImgsService.java

@ -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.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.ViolationsRecordsImgsDTO;
import com.elink.esua.epdc.entity.ViolationsRecordsImgsEntity;
import java.util.List;
import java.util.Map;
/**
* 违规记录图片信息
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-07-08
*/
public interface ViolationsRecordsImgsService extends BaseService<ViolationsRecordsImgsEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<ViolationsRecordsImgsDTO>
* @author generator
* @date 2020-07-08
*/
PageData<ViolationsRecordsImgsDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<ViolationsRecordsImgsDTO>
* @author generator
* @date 2020-07-08
*/
List<ViolationsRecordsImgsDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return ViolationsRecordsImgsDTO
* @author generator
* @date 2020-07-08
*/
ViolationsRecordsImgsDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2020-07-08
*/
void save(ViolationsRecordsImgsDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2020-07-08
*/
void update(ViolationsRecordsImgsDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2020-07-08
*/
void delete(String[] ids);
/**
* @describe: 插入违规记录图片
* @author wangtong
* @date 2020/7/8 9:54
* @param [imgUrls, id]
* @return Result
*/
Result insertImages(List<String> imgUrls, String id);
}

123
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/impl/CheckRecordsImgsServiceImpl.java

@ -0,0 +1,123 @@
/**
* 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.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.FieldConstant;
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.utils.Result;
import com.elink.esua.epdc.dao.CheckRecordsImgsDao;
import com.elink.esua.epdc.dto.CheckRecordsImgsDTO;
import com.elink.esua.epdc.entity.CheckRecordsImgsEntity;
import com.elink.esua.epdc.redis.CheckRecordsImgsRedis;
import com.elink.esua.epdc.service.CheckRecordsImgsService;
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.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 待审核图片信息
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-07-08
*/
@Service
public class CheckRecordsImgsServiceImpl extends BaseServiceImpl<CheckRecordsImgsDao, CheckRecordsImgsEntity> implements CheckRecordsImgsService {
@Autowired
private CheckRecordsImgsRedis checkRecordsImgsRedis;
@Override
public PageData<CheckRecordsImgsDTO> page(Map<String, Object> params) {
IPage<CheckRecordsImgsEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, CheckRecordsImgsDTO.class);
}
@Override
public List<CheckRecordsImgsDTO> list(Map<String, Object> params) {
List<CheckRecordsImgsEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, CheckRecordsImgsDTO.class);
}
private QueryWrapper<CheckRecordsImgsEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<CheckRecordsImgsEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public CheckRecordsImgsDTO get(String id) {
CheckRecordsImgsEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, CheckRecordsImgsDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(CheckRecordsImgsDTO dto) {
CheckRecordsImgsEntity entity = ConvertUtils.sourceToTarget(dto, CheckRecordsImgsEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(CheckRecordsImgsDTO dto) {
CheckRecordsImgsEntity entity = ConvertUtils.sourceToTarget(dto, CheckRecordsImgsEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional
public Result insertImages(List<String> imgUrls, String referencrId) {
List<CheckRecordsImgsEntity> fileEntities = new ArrayList<>(imgUrls.size());
int j = 0;
for(String url : imgUrls){
CheckRecordsImgsEntity entity = new CheckRecordsImgsEntity();
entity.setReferenceId(referencrId);
entity.setUrl(url);
entity.setSort(j);
fileEntities.add(entity);
j++;
}
insertBatch(fileEntities);
return new Result();
}
}

123
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/impl/ViolationsRecordsImgsServiceImpl.java

@ -0,0 +1,123 @@
/**
* 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.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.FieldConstant;
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.utils.Result;
import com.elink.esua.epdc.dao.ViolationsRecordsImgsDao;
import com.elink.esua.epdc.dto.ViolationsRecordsImgsDTO;
import com.elink.esua.epdc.entity.ViolationsRecordsImgsEntity;
import com.elink.esua.epdc.redis.ViolationsRecordsImgsRedis;
import com.elink.esua.epdc.service.ViolationsRecordsImgsService;
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.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 违规记录图片信息
*
* @author qu qu@elink-cn.com
* @since v1.0.0 2020-07-08
*/
@Service
public class ViolationsRecordsImgsServiceImpl extends BaseServiceImpl<ViolationsRecordsImgsDao, ViolationsRecordsImgsEntity> implements ViolationsRecordsImgsService {
@Autowired
private ViolationsRecordsImgsRedis violationsRecordsImgsRedis;
@Override
public PageData<ViolationsRecordsImgsDTO> page(Map<String, Object> params) {
IPage<ViolationsRecordsImgsEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ViolationsRecordsImgsDTO.class);
}
@Override
public List<ViolationsRecordsImgsDTO> list(Map<String, Object> params) {
List<ViolationsRecordsImgsEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ViolationsRecordsImgsDTO.class);
}
private QueryWrapper<ViolationsRecordsImgsEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<ViolationsRecordsImgsEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ViolationsRecordsImgsDTO get(String id) {
ViolationsRecordsImgsEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ViolationsRecordsImgsDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(ViolationsRecordsImgsDTO dto) {
ViolationsRecordsImgsEntity entity = ConvertUtils.sourceToTarget(dto, ViolationsRecordsImgsEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(ViolationsRecordsImgsDTO dto) {
ViolationsRecordsImgsEntity entity = ConvertUtils.sourceToTarget(dto, ViolationsRecordsImgsEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional
public Result insertImages(List<String> imgUrls, String referencrId) {
List<ViolationsRecordsImgsEntity> fileEntities = new ArrayList<>(imgUrls.size());
int j = 0;
for(String url : imgUrls){
ViolationsRecordsImgsEntity entity = new ViolationsRecordsImgsEntity();
entity.setReferenceId(referencrId);
entity.setUrl(url);
entity.setSort(j);
fileEntities.add(entity);
j++;
}
insertBatch(fileEntities);
return new Result();
}
}

15
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/java/com/elink/esua/epdc/service/impl/ViolationsRecordsServiceImpl.java

@ -20,15 +20,17 @@ package com.elink.esua.epdc.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.FieldConstant;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.security.content.dto.form.SaveCheckRecordsDTO;
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.dao.ViolationsRecordsDao;
import com.elink.esua.epdc.dto.ViolationsRecordsDTO;
import com.elink.esua.epdc.entity.ViolationsRecordsEntity;
import com.elink.esua.epdc.redis.ViolationsRecordsRedis;
import com.elink.esua.epdc.service.CheckRecordsImgsService;
import com.elink.esua.epdc.service.ViolationsRecordsImgsService;
import com.elink.esua.epdc.service.ViolationsRecordsService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -51,6 +53,12 @@ public class ViolationsRecordsServiceImpl extends BaseServiceImpl<ViolationsReco
@Autowired
private ViolationsRecordsRedis violationsRecordsRedis;
@Autowired
private CheckRecordsImgsService checkRecordsImgsService;
@Autowired
private ViolationsRecordsImgsService violationsRecordsImgsService;
@Override
public PageData<ViolationsRecordsDTO> page(Map<String, Object> params) {
IPage<ViolationsRecordsEntity> page = baseDao.selectPage(
@ -103,10 +111,14 @@ public class ViolationsRecordsServiceImpl extends BaseServiceImpl<ViolationsReco
baseDao.deleteBatchIds(Arrays.asList(ids));
}
@Override
@Transactional(rollbackFor=Exception.class)
public Result insertViolationsRecord(SaveCheckRecordsDTO formDto) {
ViolationsRecordsEntity entity = ConvertUtils.sourceToTarget(formDto, ViolationsRecordsEntity.class);
insert(entity);
//保存违规记录图片
violationsRecordsImgsService.insertImages(formDto.getImgUrls(),entity.getId());
return new Result();
}
@ -114,6 +126,7 @@ public class ViolationsRecordsServiceImpl extends BaseServiceImpl<ViolationsReco
public Result insertRecords(SaveCheckRecordsDTO formDto) {
ViolationsRecordsEntity entity = ConvertUtils.sourceToTarget(formDto, ViolationsRecordsEntity.class);
insert(entity);
checkRecordsImgsService.insertImages(formDto.getImgUrls(),entity.getId());
return new Result();
}

9
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/resources/mapper/CheckRecordsDao.xml

@ -9,18 +9,13 @@
<result property="name" column="NAME"/>
<result property="category" column="CATEGORY"/>
<result property="relationId" column="RELATION_ID"/>
<result property="type" column="TYPE"/>
<result property="module" column="MODULE"/>
<result property="content" column="CONTENT"/>
<result property="url" column="URL"/>
<result property="code" column="CODE"/>
<result property="msg" column="MSG"/>
<result property="suggestionText" column="SUGGESTION_TEXT"/>
<result property="suggestionImgPorn" column="SUGGESTION_IMG_PORN"/>
<result property="suggestionImgTerrorism" column="SUGGESTION_IMG_TERRORISM"/>
<result property="labelText" column="LABEL_TEXT"/>
<result property="labelImgPorn" column="LABEL_IMG_PORN"/>
<result property="labelImgTerrorism" column="LABEL_IMG_TERRORISM"/>
<result property="suggestion" column="SUGGESTION"/>
<result property="label" column="LABEL"/>
<result property="rate" column="RATE"/>
<result property="allPass" column="ALL_PASS"/>
<result property="delFlag" column="DEL_FLAG"/>

20
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/resources/mapper/CheckRecordsImgsDao.xml

@ -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.dao.CheckRecordsImgsDao">
<resultMap type="com.elink.esua.epdc.entity.CheckRecordsImgsEntity" id="checkRecordsImgsMap">
<result property="id" column="ID"/>
<result property="referenceId" column="REFERENCE_ID"/>
<result property="url" column="URL"/>
<result property="thumbnail" column="THUMBNAIL"/>
<result property="sort" column="SORT"/>
<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>

9
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/resources/mapper/ViolationsRecordsDao.xml

@ -9,19 +9,14 @@
<result property="name" column="NAME"/>
<result property="category" column="CATEGORY"/>
<result property="relationId" column="RELATION_ID"/>
<result property="type" column="TYPE"/>
<result property="decision" column="DECISION"/>
<result property="module" column="MODULE"/>
<result property="content" column="CONTENT"/>
<result property="url" column="URL"/>
<result property="code" column="CODE"/>
<result property="msg" column="MSG"/>
<result property="suggestionText" column="SUGGESTION_TEXT"/>
<result property="suggestionImgPorn" column="SUGGESTION_IMG_PORN"/>
<result property="suggestionImgTerrorism" column="SUGGESTION_IMG_TERRORISM"/>
<result property="labelText" column="LABEL_TEXT"/>
<result property="labelImgPorn" column="LABEL_IMG_PORN"/>
<result property="labelImgTerrorism" column="LABEL_IMG_TERRORISM"/>
<result property="suggestion" column="SUGGESTION"/>
<result property="label" column="LABEL"/>
<result property="rate" column="RATE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>

20
esua-epdc/epdc-module/epdc-content-security/epdc-content-security-server/src/main/resources/mapper/ViolationsRecordsImgsDao.xml

@ -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.dao.ViolationsRecordsImgsDao">
<resultMap type="com.elink.esua.epdc.entity.ViolationsRecordsImgsEntity" id="violationsRecordsImgsMap">
<result property="id" column="ID"/>
<result property="referenceId" column="REFERENCE_ID"/>
<result property="url" column="URL"/>
<result property="thumbnail" column="THUMBNAIL"/>
<result property="sort" column="SORT"/>
<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>

44
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActUserClockLogServiceImpl.java

@ -304,29 +304,23 @@ public class ActUserClockLogServiceImpl extends BaseServiceImpl<ActUserClockLogD
public Result activityClock(AppActUserClockLogDTO appActUserClockLogDTO) {
//内容审核
CheckResultDTO contentResult = CheckDataUtils.checkContent(null,appActUserClockLogDTO.getClockDesc());
CheckResultDTO imgResult = CheckDataUtils.checkImgs(null,appActUserClockLogDTO.getImages());
CheckResultDTO imgResult = CheckDataUtils.checkImgs(appActUserClockLogDTO.getImages());
if(contentResult!= null && imgResult!=null
&& 200 == contentResult.getDetails().get(0).getCode()
&& 200 == imgResult.getDetails().get(0).getCode()){
if(!contentResult.getAllPass() || !imgResult.getAllPass()){
SaveCheckRecordsDTO record = new SaveCheckRecordsDTO();
record.setUserId(appActUserClockLogDTO.getUserId());
String userName = "";
Result<UserDTO> user = userInfoFeignClient.getUserInfoById(appActUserClockLogDTO.getUserId());
if(user.getData()!=null){
record.setName(user.getData().getNickname());
userName = user.getData().getNickname();
}
record.setCategory("2");//居民
record.setDecision("1");//系统判定
record.setModule("help_signIn");//初心互助-已报名活动-我要打卡
record.setContent(appActUserClockLogDTO.getClockDesc());
String urls = StringUtils.join(appActUserClockLogDTO.getImages().toArray(), ",");
record.setUrl(urls);
CheckResultMessageDTO messageResult = CheckDataUtils.getCheckResultMessage(contentResult,imgResult);
record.setSuggestion(messageResult.getSuggestion());
record.setLabel(messageResult.getLabel());
record.setRate(messageResult.getRate());
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getViolationsRecords(appActUserClockLogDTO.getUserId(),
userName,"2","help_signIn",appActUserClockLogDTO.getClockDesc(),
appActUserClockLogDTO.getImages(),contentResult,imgResult);
contentSecurityFeign.insertViolationsRecord(record);
return new Result().error("内容审核未通过,请修改后重新提交!");
return new Result().error(CheckDataUtils.violations_message);
}
}else{
logger.error("解析审核结果异常contentResult:"+contentResult +"---imgResult:"+imgResult);
@ -368,21 +362,17 @@ public class ActUserClockLogServiceImpl extends BaseServiceImpl<ActUserClockLogD
//保存待审核记录
CheckResultMessageDTO twoTypes = CheckDataUtils.checkTwoTypes(contentResult, imgResult);
if(CheckDataUtils.review.equals(twoTypes.getSuggestion())){
SaveCheckRecordsDTO record = new SaveCheckRecordsDTO();
record.setUserId(appActUserClockLogDTO.getUserId());
String userName = "";
Result<UserDTO> user = userInfoFeignClient.getUserInfoById(appActUserClockLogDTO.getUserId());
if(user.getData()!=null){
record.setName(user.getData().getNickname());
userName = user.getData().getNickname();
}
record.setCategory("2");//居民
record.setModule("help_signIn");//初心互助-已报名活动-我要打卡
record.setContent(appActUserClockLogDTO.getClockDesc());
String urls = StringUtils.join(appActUserClockLogDTO.getImages().toArray(), ",");
record.setUrl(urls);
record.setRelationId(entity.getId());
record.setSuggestion(twoTypes.getSuggestion());
record.setLabel(twoTypes.getLabel());
record.setRate(twoTypes.getRate());
//组装要保存的信息
SaveCheckRecordsDTO record = CheckDataUtils.getUnCheckRecords(appActUserClockLogDTO.getUserId(),
userName,"2","help_signIn",appActUserClockLogDTO.getClockDesc(),
appActUserClockLogDTO.getImages(),entity.getId(),twoTypes);
contentSecurityFeign.insertRecords(record);
}
return new Result().ok("打卡成功");

Loading…
Cancel
Save