jk-GitHub-coder 3 jaren geleden
bovenliggende
commit
8f768bce63

+ 6 - 0
YijiaRestful/src/main/java/com/platform/yijia/controller/CouponController.java

@@ -475,6 +475,12 @@ public class CouponController {
                             if(userCouponInfo.getCouponType().equals("3")){
                                 //当前异业券的核销站点
                                 String verification = userCouponInfo.getVerification();
+                                StationInfo stationInfo = new StationInfo();
+                                stationInfo.setStationId(cu.getStationId());
+                                StationInfo stationInfos = stationService.selectStationInfo(stationInfo);
+                                if(StringUtils.isNotBlank(stationInfos.getCouponFlag()) && stationInfos.getCouponFlag().equals("1")){
+                                    verificationId = stationInfos.getGroupId().toString();
+                                }
                                 boolean contains = verification.contains(verificationId);
                                 //是否能在该核销点核销
                                 if(contains){

+ 5 - 5
YijiaRestful/src/main/resources/mapper/CouponMapper.xml

@@ -435,14 +435,14 @@
     <!--查询核销站点信息-->
     <select id="selectCouponVerificationUserInfo" parameterType="com.platform.yijia.pojo.CouponVerificationUser" resultType="com.platform.yijia.pojo.CouponVerificationUser">
         SELECT
-            union_id,
-            mobile_phone,
-            dept_id         AS stationId
+            T1.union_id,
+            T1.mobile_phone,
+            T2.dept_id         AS stationId
         FROM            coupon_verification_user      AS T1
-        LEFT JOIN       sys_dept                      AS T2  ON T1.mobile_phone = T2.phonenumber
+        LEFT JOIN       sys_user                      AS T2  ON T1.mobile_phone = T2.phonenumber
         <where>
             <if test="unionId !=null and unionId !=''">
-                union_id = #{unionId}
+                T1.union_id = #{unionId}
             </if>
         </where>