yangdamao 1 年之前
父节点
当前提交
a8c8f2a791

+ 5 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java

@@ -2195,6 +2195,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         return "";
     }
 
+    @Override
+    public Integer getBusinessPhotoSign(Long orderGoodsId) {
+        return baseMapper.getBusinessPhotoSign(orderGoodsId);
+    }
+
     @Override
     public Map<String, Object> accountLogin(UserAppAccountLoginBo bo) {
         if(Validator.isEmpty(bo.getAccount())){

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/domain/CourseBusiness.java

@@ -76,6 +76,8 @@ private static final long serialVersionUID=1L;
     private Integer periodCheckSign;
     /** 学习提示标签:1开启 0关闭 */
     private Integer reminderSign;
+    /** 是否需要增强拍照标签:1开启 0关闭 */
+    private Integer photoSign;
     private Long tenantId;
 
     @TableField(exist = false)

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderGoodsEditBo.java

@@ -116,4 +116,6 @@ public class OrderGoodsEditBo {
     /** 复制状态 1自学 2复制 */
     @ApiModelProperty("复制状态 1自学 2复制")
     private Integer sevenClassCopy;
+    @ApiModelProperty("是否线下退款标识:0否 1是")
+    private Integer offlineRefundSign;
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/domain/OrderGoods.java

@@ -103,6 +103,8 @@ private static final long serialVersionUID=1L;
     private Integer sevenClassStatus;
     /** 复制状态 1自学 2复制 */
     private Long sevenClassCopy;
+    /** 是否线下退款标识:0否 1是 */
+    private Integer offlineRefundSign;
 
     private Long tenantId;
 

+ 2 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/OrderGoodsVo.java

@@ -379,7 +379,8 @@ public class OrderGoodsVo {
 	@ApiModelProperty("资料审核状态  1通过 3不通过 2待审")
 	private Long profileStatus;
 
-
+	@ApiModelProperty("是否线下退款标识:0否 1是")
+	private Integer offlineRefundSign;
 	@ApiModelProperty("学员资料 变更状态 2变更 1否")
 	private Integer profileChangeStatus;
 

+ 32 - 29
zhongzheng-system/src/main/java/com/zhongzheng/modules/tencentcloud/service/impl/FaceOcrServiceImpl.java

@@ -154,35 +154,38 @@ public class FaceOcrServiceImpl implements IFaceOcrService {
             if(Validator.isEmpty(face[0].getFaceQualityInfo().getCompleteness())){
                 throw new CustomException("照片五官不达标");
             }
-            FaceQualityCompleteness completeness = face[0].getFaceQualityInfo().getCompleteness();
-            if (ObjectUtils.isNull(completeness.getEyebrow()) || completeness.getEyebrow() < 80){
-                throw new CustomException("请勿遮挡眉毛");
-            }
-            if (ObjectUtils.isNull(completeness.getEye()) || completeness.getEye() < 80){
-                throw new CustomException("请勿遮挡眼睛");
-            }
-            if (ObjectUtils.isNull(completeness.getNose()) || completeness.getNose() < 60){
-                throw new CustomException("请勿遮挡鼻子");
-            }
-            if (ObjectUtils.isNull(completeness.getCheek()) || completeness.getCheek() < 70){
-                throw new CustomException("请勿遮挡脸颊");
-            }
-            if (ObjectUtils.isNull(completeness.getMouth()) || completeness.getMouth() < 50){
-                throw new CustomException("请勿遮挡嘴巴");
-            }
-            if (ObjectUtils.isNull(completeness.getChin()) || completeness.getChin() < 60){
-                throw new CustomException("请勿遮挡下巴");
-            }
-            if (imageWidth * 0.55 < face[0].getWidth()){
-                throw new CustomException("人脸与摄像头距离太近,请把摄像头或手机离脸远一些再拍照!");
-            }
-            if (imageHeight * 0.85 < (face[0].getY()+face[0].getHeight())){
-                throw new CustomException("照片的人脸太下,请拍照时把两肩拍出来!");
-            }
-            if(face[0].getX()<0|| face[0].getY()<0
-                    || (face[0].getX() + face[0].getWidth()) > imageWidth)
-            {
-                throw new CustomException("请保证人脸全部在照片范围内!");
+            Integer photoSign = iUserService.getBusinessPhotoSign(bo.getOrderGoodsId());
+            if (photoSign == 1){
+                FaceQualityCompleteness completeness = face[0].getFaceQualityInfo().getCompleteness();
+                if (ObjectUtils.isNull(completeness.getEyebrow()) || completeness.getEyebrow() < 80){
+                    throw new CustomException("请勿遮挡眉毛");
+                }
+                if (ObjectUtils.isNull(completeness.getEye()) || completeness.getEye() < 80){
+                    throw new CustomException("请勿遮挡眼睛");
+                }
+                if (ObjectUtils.isNull(completeness.getNose()) || completeness.getNose() < 60){
+                    throw new CustomException("请勿遮挡鼻子");
+                }
+                if (ObjectUtils.isNull(completeness.getCheek()) || completeness.getCheek() < 70){
+                    throw new CustomException("请勿遮挡脸颊");
+                }
+                if (ObjectUtils.isNull(completeness.getMouth()) || completeness.getMouth() < 50){
+                    throw new CustomException("请勿遮挡嘴巴");
+                }
+                if (ObjectUtils.isNull(completeness.getChin()) || completeness.getChin() < 60){
+                    throw new CustomException("请勿遮挡下巴");
+                }
+                if (imageWidth * 0.55 < face[0].getWidth()){
+                    throw new CustomException("人脸与摄像头距离太近,请把摄像头或手机离脸远一些再拍照!");
+                }
+                if (imageHeight * 0.85 < (face[0].getY()+face[0].getHeight())){
+                    throw new CustomException("照片的人脸太下,请拍照时把两肩拍出来!");
+                }
+                if(face[0].getX()<0|| face[0].getY()<0
+                        || (face[0].getX() + face[0].getWidth()) > imageWidth)
+                {
+                    throw new CustomException("请保证人脸全部在照片范围内!");
+                }
             }
         }catch (TencentCloudSDKException e){
             throw new CustomException("人脸检测错误:"+e.getMessage());

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/mapper/UserMapper.java

@@ -96,4 +96,6 @@ public interface UserMapper extends BaseMapper<User> {
     Long getFistStudyTime(@Param("userId")Long userId,@Param("tenantId")Long tenantId,@Param("businessName")String businessName);
 
     List<UserBusinessGoodsVo> getCourseByUser(UserBusinessGoodsBo item);
+
+    Integer getBusinessPhotoSign(@Param("orderGoodsId")Long orderGoodsId);
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserService.java

@@ -170,4 +170,6 @@ public interface IUserService extends IService<User> {
 	List<UserBusinessGoodsVo> getUserBusinessGoods(List<UserBusinessGoodsBo> bos);
 
     String studyRecord(List<UserStudyExportVo> customerBos);
+
+	Integer getBusinessPhotoSign(Long orderGoodsId);
 }

+ 1 - 0
zhongzheng-system/src/main/resources/mapper/modules/order/OrderGoodsMapper.xml

@@ -63,6 +63,7 @@
         <result property="periodStatus" column="period_status"/>
         <result property="distributionCode" column="distribution_code"/>
         <result property="distributionLinkCode" column="distribution_link_code"/>
+        <result property="offlineRefundSign" column="offline_refund_sign"/>
 
         <result property="code" column="code"/>
         <result property="goodsName" column="goods_name"/>

+ 13 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserMapper.xml

@@ -714,6 +714,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             og.create_time DESC
     </select>
 
+
+    <select id="getBusinessPhotoSign" parameterType="java.lang.Long" resultType="java.lang.Integer">
+        SELECT
+            cb.photo_sign
+        FROM
+            order_goods og
+                LEFT JOIN goods g ON og.goods_id = g.goods_id
+                LEFT JOIN course_business cb ON g.business_id = cb.id
+        WHERE
+            og.order_goods_id = #{orderGoodsId}
+            LIMIT 1
+    </select>
+
     <select id="getUserOrderCount" parameterType="map" resultType="java.lang.Long">
         SELECT
             COUNT(o.order_sn)