Jelajahi Sumber

理疗红包新增打卡业务

wjj 3 hari lalu
induk
melakukan
2556fb0138

+ 5 - 0
fs-service/src/main/java/com/fs/patient/domain/FsProjectRedPacketRecord.java

@@ -80,5 +80,10 @@ public class FsProjectRedPacketRecord extends BaseEntity{
     @Excel(name = "公司名称")
     private String companyName;
 
+    //打卡文件地址
+    private String signUrl;
+    //打卡类型:0无需 1图片 2视频
+    private Integer type;
+
 
 }

+ 5 - 0
fs-service/src/main/java/com/fs/patient/param/FsProjectSendRewardUParam.java

@@ -13,4 +13,9 @@ public class FsProjectSendRewardUParam {
     //患者基础信息id
     private Long patientId;
 
+    //打卡文件地址
+    private String signUrl;
+    //打卡类型:0无需 1图片 2视频
+    private Integer type;
+
 }

+ 6 - 0
fs-service/src/main/java/com/fs/patient/service/impl/FsPatientBaseInfoServiceImpl.java

@@ -335,6 +335,7 @@ public class FsPatientBaseInfoServiceImpl extends ServiceImpl<FsPatientBaseInfoM
         BigDecimal amount = new BigDecimal("0.1");
         boolean openFlag = false;
         Long redSecond = 0L;
+        Integer type = 1;
         String json = getProjectRedPacketConfig();
         if(StringUtils.isNotEmpty(json)) {
             try {
@@ -345,15 +346,18 @@ public class FsPatientBaseInfoServiceImpl extends ServiceImpl<FsPatientBaseInfoM
                 }
                 amount = jsonObject.getBigDecimal("amount");
                 redSecond = jsonObject.getLong("redSecond");
+                type = jsonObject.getInteger("type");
             } catch (Exception e) {
                 log.error("解析理疗红包配置失败, json={}", json, e);
                 amount = new BigDecimal("0.1");
                 redSecond = 0L;
+                type = 1;
             }
         }
         patientBaseInfoVO.setAmount(amount);
         patientBaseInfoVO.setOpenFlag(openFlag);
         patientBaseInfoVO.setRedSecond(redSecond);
+        patientBaseInfoVO.setType(type);
         return R.ok().put("data", patientBaseInfoVO);
     }
 
@@ -563,6 +567,8 @@ public class FsPatientBaseInfoServiceImpl extends ServiceImpl<FsPatientBaseInfoM
             redPacketRecord.setSendTime(new Date());
             redPacketRecord.setCreateTime(new Date());
             redPacketRecord.setAmount(amount);
+            redPacketRecord.setType(param.getType());
+            redPacketRecord.setSignUrl(param.getSignUrl());
             projectRedPacketRecordMapper.insertFsProjectRedPacketRecord(redPacketRecord);
             return sendRedPacket;
         } else {

+ 3 - 0
fs-service/src/main/java/com/fs/patient/vo/PatientBaseInfoVO.java

@@ -61,4 +61,7 @@ public class PatientBaseInfoVO {
 
     //阅读秒
     private Long redSecond;
+
+    //打卡方式 0无需 1图片 2视频
+    private Integer type;
 }

+ 11 - 1
fs-service/src/main/resources/mapper/patient/FsProjectRedPacketRecordMapper.xml

@@ -22,10 +22,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="userName"    column="user_name"    />
         <result property="companyId"    column="company_id"    />
         <result property="companyName"    column="company_name"    />
+        <result property="signUrl"    column="sign_url"    />
+        <result property="type"    column="type"    />
     </resultMap>
 
     <sql id="selectFsProjectRedPacketRecordVo">
-        select id, user_id, company_user_id, project_id, amount, out_batch_no, result, batch_id, collect_tag, send_time, collect_time, collect_type, update_time, create_time, user_name, company_id, company_name from fs_project_red_packet_record
+        select id, user_id, company_user_id, project_id, amount, out_batch_no, result, batch_id, collect_tag, send_time, collect_time, collect_type, update_time
+             , create_time, user_name, company_id
+             , company_name ,sign_url, type from fs_project_red_packet_record
     </sql>
 
     <select id="selectFsProjectRedPacketRecordList" parameterType="FsProjectRedPacketRecord" resultMap="FsProjectRedPacketRecordResult">
@@ -73,6 +77,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userName != null">user_name,</if>
             <if test="companyId != null">company_id,</if>
             <if test="companyName != null">company_name,</if>
+            <if test="signUrl != null">sign_url,</if>
+            <if test="type != null">type,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -92,6 +98,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userName != null">#{userName},</if>
             <if test="companyId != null">#{companyId},</if>
             <if test="companyName != null">#{companyName},</if>
+            <if test="signUrl != null">#{signUrl},</if>
+            <if test="type != null">#{type},</if>
          </trim>
     </insert>
 
@@ -114,6 +122,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userName != null">user_name = #{userName},</if>
             <if test="companyId != null">company_id = #{companyId},</if>
             <if test="companyName != null">company_name = #{companyName},</if>
+            <if test="signUrl != null">sign_url = #{signUrl},</if>
+            <if test="type != null">type = #{type},</if>
         </trim>
         where id = #{id}
     </update>