瀏覽代碼

Merge remote-tracking branch 'origin/children_day' into children_day

zouxuan 4 年之前
父節點
當前提交
88b7963d06

+ 62 - 18
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/OrganizationDegreeCourseFee.java

@@ -2,48 +2,67 @@ package com.ym.mec.biz.dal.entity;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+
 import java.math.BigDecimal;
 import java.util.Date;
 
-@ApiModel(value="com-domain-OrganizationDegreeCourseFee")
+@ApiModel(value = "com-domain-OrganizationDegreeCourseFee")
 public class OrganizationDegreeCourseFee {
-    @ApiModelProperty(value="")
+    @ApiModelProperty(value = "")
     private Integer id;
 
     /**
-    * 分部id
-    */
-    @ApiModelProperty(value="分部id")
+     * 分部id
+     */
+    @ApiModelProperty(value = "分部id")
     private Integer organId;
 
     /**
-    * vip 1v1课价格
-    */
-    @ApiModelProperty(value="vip 1v1课价格")
+     * vip 1v1课原价格
+     */
+    @ApiModelProperty(value = "vip 1v1课原价格")
+    private BigDecimal originalVip1v1;
+
+    /**
+     * vip 1v2课原价格
+     */
+    @ApiModelProperty(value = "vip 1v2课原价格")
+    private BigDecimal originalVip1v2;
+
+    /**
+     * vip 1v1课价格
+     */
+    @ApiModelProperty(value = "vip 1v1课价格")
     private BigDecimal vip1v1;
 
     /**
      * vip 1v2课价格
      */
-    @ApiModelProperty(value="vip 1v2课价格")
+    @ApiModelProperty(value = "vip 1v2课价格")
     private BigDecimal vip1v2;
 
     /**
-    * 乐理课价格
-    */
-    @ApiModelProperty(value="乐理课价格")
+     * 乐理课原价格
+     */
+    @ApiModelProperty(value = "乐理课价格")
+    private BigDecimal originalTheory;
+
+    /**
+     * 乐理课价格
+     */
+    @ApiModelProperty(value = "乐理课价格")
     private BigDecimal theory;
 
     /**
-    * 创建时间
-    */
-    @ApiModelProperty(value="创建时间")
+     * 创建时间
+     */
+    @ApiModelProperty(value = "创建时间")
     private Date createTime;
 
     /**
-    * 修改时间
-    */
-    @ApiModelProperty(value="修改时间")
+     * 修改时间
+     */
+    @ApiModelProperty(value = "修改时间")
     private Date updateTime;
 
     public Integer getId() {
@@ -86,6 +105,31 @@ public class OrganizationDegreeCourseFee {
         this.theory = theory;
     }
 
+
+    public BigDecimal getOriginalVip1v1() {
+        return originalVip1v1;
+    }
+
+    public void setOriginalVip1v1(BigDecimal originalVip1v1) {
+        this.originalVip1v1 = originalVip1v1;
+    }
+
+    public BigDecimal getOriginalVip1v2() {
+        return originalVip1v2;
+    }
+
+    public void setOriginalVip1v2(BigDecimal originalVip1v2) {
+        this.originalVip1v2 = originalVip1v2;
+    }
+
+    public BigDecimal getOriginalTheory() {
+        return originalTheory;
+    }
+
+    public void setOriginalTheory(BigDecimal originalTheory) {
+        this.originalTheory = originalTheory;
+    }
+
     public Date getCreateTime() {
         return createTime;
     }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ChildrenDayReserveServiceImpl.java

@@ -460,7 +460,7 @@ public class ChildrenDayReserveServiceImpl extends BaseServiceImpl<Integer, Chil
                 userMap, null, 0, "5?" + pushUrl, "STUDENT");
 
         sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS, MessageTypeEnum.CHILDREN_DAY_NOTICE_MSG,
-                userPhoneMap, null, 0, null, null, pushUrl);
+                userPhoneMap, null, 0, null, null, HttpUtil.getSortUrl(pushUrl));
         return true;
     }
 }

+ 42 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java

@@ -154,6 +154,27 @@ public class ExportServiceImpl implements ExportService {
                             }
                             row.setCloudTeacherFee(cloudTeacherFee);
                             break;
+                        case DEGREE_REGISTRATION:
+                            BigDecimal degreeFee = BigDecimal.ZERO;
+                            if (row.getExpectAmount().compareTo(BigDecimal.ZERO) > 0) {
+                                degreeFee = orderDetail.getPrice().multiply(row.getActualAmount()).divide(row.getExpectAmount(), 2, BigDecimal.ROUND_DOWN);
+                            }
+                            row.setDegreeFee(degreeFee);
+                            break;
+                        case VIP:
+                            BigDecimal vipCourseFee = BigDecimal.ZERO;
+                            if (row.getExpectAmount().compareTo(BigDecimal.ZERO) > 0) {
+                                vipCourseFee = orderDetail.getPrice().multiply(row.getActualAmount()).divide(row.getExpectAmount(), 2, BigDecimal.ROUND_DOWN);
+                            }
+                            row.setVipCourseFee(vipCourseFee);
+                            break;
+                        case THEORY_COURSE:
+                            BigDecimal theoryCourseFee = BigDecimal.ZERO;
+                            if (row.getExpectAmount().compareTo(BigDecimal.ZERO) > 0) {
+                                theoryCourseFee = orderDetail.getPrice().multiply(row.getActualAmount()).divide(row.getExpectAmount(), 2, BigDecimal.ROUND_DOWN);
+                            }
+                            row.setTheoryCourseFee(theoryCourseFee);
+                            break;
                         default:
                             break;
                     }
@@ -424,6 +445,27 @@ public class ExportServiceImpl implements ExportService {
                             }
                             row.setCloudTeacherFee(cloudTeacherFee);
                             break;
+                        case DEGREE_REGISTRATION:
+                            BigDecimal degreeFee = BigDecimal.ZERO;
+                            if (row.getExpectAmount().compareTo(BigDecimal.ZERO) > 0) {
+                                degreeFee = orderDetail.getPrice().multiply(row.getActualAmount()).divide(row.getExpectAmount(), 2, BigDecimal.ROUND_DOWN);
+                            }
+                            row.setDegreeFee(degreeFee);
+                            break;
+                        case VIP:
+                            BigDecimal vipCourseFee = BigDecimal.ZERO;
+                            if (row.getExpectAmount().compareTo(BigDecimal.ZERO) > 0) {
+                                vipCourseFee = orderDetail.getPrice().multiply(row.getActualAmount()).divide(row.getExpectAmount(), 2, BigDecimal.ROUND_DOWN);
+                            }
+                            row.setVipCourseFee(vipCourseFee);
+                            break;
+                        case THEORY_COURSE:
+                            BigDecimal theoryCourseFee = BigDecimal.ZERO;
+                            if (row.getExpectAmount().compareTo(BigDecimal.ZERO) > 0) {
+                                theoryCourseFee = orderDetail.getPrice().multiply(row.getActualAmount()).divide(row.getExpectAmount(), 2, BigDecimal.ROUND_DOWN);
+                            }
+                            row.setTheoryCourseFee(theoryCourseFee);
+                            break;
                         default:
                             break;
                     }

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -716,6 +716,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         studentPaymentOrder.setOrganId(musicGroup.getOrganId());
         studentPaymentOrder.setRoutingOrganId(musicGroup.getOrganId());
         studentPaymentOrder.setUpdateTime(date);
+
+        if ("205".equals(studentPaymentOrder.getPaymentAccountNo())) {
+            studentPaymentOrder.setPaymentChannel("ADAPAY");
+        }
         studentPaymentOrderService.update(studentPaymentOrder);
         studentPaymentOrder.setVersion(studentPaymentOrder.getVersion() + 1);
 
@@ -887,6 +891,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         studentPaymentOrder.setOrganId(musicGroup.getOrganId());
         studentPaymentOrder.setRoutingOrganId(musicGroup.getOrganId());
         studentPaymentOrder.setUpdateTime(date);
+
+        if ("205".equals(studentPaymentOrder.getPaymentAccountNo())) {
+            studentPaymentOrder.setPaymentChannel("ADAPAY");
+        }
         studentPaymentOrderService.update(studentPaymentOrder);
         studentPaymentOrder.setVersion(studentPaymentOrder.getVersion() + 1);
 

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/ChildrenDayReserveMapper.xml

@@ -304,7 +304,7 @@
         SELECT cdr.*,su.phone_ FROM children_day_reserve cdr
         LEFT JOIN sys_user su ON su.id_ = cdr.user_id_
         <where>
-            <foreach collection="msgDtos" item="msgDto" separator=",">
+            <foreach collection="msgDtos" item="msgDto">
                 <if test="msgDto.musicGroupId != null">
                     OR (cdr.organ_id_=#{msgDto.organId} AND cdr.music_group_id_ = #{msgDto.musicGroupId})
                 </if>

+ 13 - 2
mec-biz/src/main/resources/config/mybatis/OrganizationDegreeCourseFeeMapper.xml

@@ -6,8 +6,11 @@
         <!--@Table organization_degree_course_fee-->
         <id column="id_" property="id"/>
         <result column="organ_id_" property="organId"/>
+        <result column="original_vip_1v1_" property="originalVip1v1"/>
+        <result column="original_vip_1v2_" property="originalVip1v2"/>
         <result column="vip_1v1_" property="vip1v1"/>
         <result column="vip_1v2_" property="vip1v2"/>
+        <result column="original_theory_" property="originalTheory"/>
         <result column="theory_" property="theory"/>
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
@@ -26,8 +29,10 @@
     <insert id="insert" keyColumn="id_" keyProperty="id"
             parameterType="com.ym.mec.biz.dal.entity.OrganizationDegreeCourseFee" useGeneratedKeys="true">
         <!--@mbg.generated-->
-        insert into organization_degree_course_fee (organ_id_, vip_1v1_, vip_1v2_,theory_, create_time_, update_time_)
-        values (#{organId}, #{vip1v1},#{vip1v2}, #{theory}, #{createTime}, #{updateTime})
+        insert into organization_degree_course_fee (organ_id_,original_vip_1v1_,original_vip_1v2_, vip_1v1_,
+        vip_1v2_,theory_, create_time_, update_time_)
+        values (#{organId},#{originalVip1v1},#{originalVip1v2}, #{vip1v1},#{vip1v2}, #{theory}, #{createTime},
+        #{updateTime})
     </insert>
     <update id="update" parameterType="com.ym.mec.biz.dal.entity.OrganizationDegreeCourseFee">
         <!--@mbg.generated-->
@@ -36,6 +41,12 @@
             <if test="organId != null">
                 organ_id_ = #{organId},
             </if>
+            <if test="originalVip1v1 != null">
+                original_vip_1v1_ = #{originalVip1v1},
+            </if>
+            <if test="originalVip1v2 != null">
+                original_vip_1v2_ = #{originalVip1v2},
+            </if>
             <if test="vip1v1 != null">
                 vip_1v1_ = #{vip1v1},
             </if>