Browse Source

Merge remote-tracking branch 'origin/master'

zouxuan 4 years ago
parent
commit
5160082167

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ReplacementInstrumentActivityDao.java

@@ -21,17 +21,17 @@ public interface ReplacementInstrumentActivityDao extends BaseDAO<Integer, Repla
 
     ReplacementInstrumentActivityStatHead countReplacementsInfo(Integer cooperationId);
 
-    int openPay(@Param("cooperationOrganId") Integer cooperationOrganId);
+    int openPay(@Param("replacementInstrumentCooperationId") Integer replacementInstrumentCooperationId);
 
     ReplacementInstrumentActivity getLock(@Param("id") Integer id);
 
     /**
      * 获取开启缴费推送的人
      *
-     * @param cooperationId
+     * @param replacementInstrumentCooperationId
      * @return
      */
-    List<ReplacementInstrumentActivityStatDto> getPushUsers(@Param("cooperationId") Integer cooperationId);
+    List<ReplacementInstrumentActivityStatDto> getPushUsers(@Param("replacementInstrumentCooperationId") Integer replacementInstrumentCooperationId);
 
     /**
      * 获取置换记录详情

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ReplacementInstrumentCooperationServiceImpl.java

@@ -46,8 +46,8 @@ public class ReplacementInstrumentCooperationServiceImpl extends BaseServiceImpl
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public ReplacementInstrumentCooperation openPay(Integer cooperationId) {
-        ReplacementInstrumentCooperation replacementInstrumentCooperation = replacementInstrumentCooperationDao.get(cooperationId);
+    public ReplacementInstrumentCooperation openPay(Integer id) {
+        ReplacementInstrumentCooperation replacementInstrumentCooperation = replacementInstrumentCooperationDao.get(id);
         if (replacementInstrumentCooperation == null) {
             throw new BizException("合作单位乐器置换活动不存在");
         }
@@ -59,9 +59,9 @@ public class ReplacementInstrumentCooperationServiceImpl extends BaseServiceImpl
 
         //发送推送链接
         //家长您好!您订购的 {乐器品牌}品牌乐器已经开始接受预定,请点击{链接地址}完成付款,付款后15个工作日以内到货,如有疑问请咨询乐团管理老师。
-        List<ReplacementInstrumentActivityStatDto> pushUsers = replacementInstrumentActivityDao.getPushUsers(cooperationId);
+        List<ReplacementInstrumentActivityStatDto> pushUsers = replacementInstrumentActivityDao.getPushUsers(id);
 
-        replacementInstrumentActivityDao.openPay(replacementInstrumentCooperation.getCooperationOrganId());
+        replacementInstrumentActivityDao.openPay(id);
 
 
         String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");

+ 3 - 3
mec-biz/src/main/resources/config/mybatis/ReplacementInstrumentActivityMapper.xml

@@ -231,7 +231,7 @@
     <update id="openPay" parameterType="integer">
         UPDATE replacement_instrument_activity
         SET open_flag_ = 1
-        WHERE cooperation_organ_id_ = #{cooperationOrganId}
+        WHERE replacement_instrument_cooperation_id_ = #{replacementInstrumentCooperationId}
           AND open_flag_ = 0
           AND instruments_id_ > 0
     </update>
@@ -248,9 +248,9 @@
         FROM replacement_instrument_activity ria
                  LEFT JOIN sys_user su ON su.id_ = ria.user_id_
                  LEFT JOIN goods g ON g.id_ = ria.instruments_id_
-        WHERE replacement_instrument_cooperation_id_ = #{cooperationId}
+        WHERE replacement_instrument_cooperation_id_ = #{replacementInstrumentCooperationId}
           AND open_flag_ = 0
-          AND instruments_id_ IS NOT NULL
+          AND instruments_id_ > 0
     </select>
 
     <select id="getInfo" resultMap="ReplacementInstrumentActivityStatDto">