ソースを参照

Merge remote-tracking branch 'origin/master'

xw 3 日 前
コミット
ff082bac07

+ 7 - 0
fs-company/src/main/java/com/fs/company/controller/store/FsUserController.java

@@ -82,6 +82,13 @@ public class FsUserController extends BaseController
     {
         fsUser.setIsDel(0);
         List<FsUser> list=fsUserService.selectFsUserList(fsUser);
+        if(list.isEmpty()){
+            //如果是加密的电话,需要加密后查询
+            if(StringUtils.isFullNumber(fsUser.getKeywords()) && fsUser.getKeywords().length() == 11){
+                fsUser.setKeywords(encryptPhone(fsUser.getKeywords()));
+            }
+            list = fsUserService.selectFsUserList(fsUser);
+        }
         return R.ok().put("data", list);
     }
 

+ 6 - 0
fs-service/src/main/java/com/fs/his/domain/FsUser.java

@@ -232,6 +232,12 @@ public class FsUser extends BaseEntity
     @TableField(exist = false)
     private String nicknameExact;
 
+    /**
+     * 搜索关键词-电话号码/会员id/会员昵称
+     * **/
+    @TableField(exist = false)
+    private String keywords;
+
     public String getNickname() {
         return nickname;
     }

+ 4 - 0
fs-service/src/main/java/com/fs/his/service/IFsStorePaymentService.java

@@ -119,6 +119,10 @@ public interface IFsStorePaymentService
     String v3TransferNotify(String notifyData, HttpServletRequest request);
 
 
+    String v3TransferNotifyWithCompanyId(Long companyId,String notifyData, HttpServletRequest request);
+
+
+
     R sendRedPacketTest(WxSendRedPacketParam param);
 
     List<FsStorePaymentVO> selectFsStorePaymentListQueryVO(FsStorePaymentParam fsStorePayment);

+ 39 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsStorePaymentServiceImpl.java

@@ -1135,6 +1135,45 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
         }
     }
 
+    @Override
+    public String v3TransferNotifyWithCompanyId(Long companyId, String notifyData, HttpServletRequest request) {
+        logger.info("分公司回调V3::companyId:{}",companyId);
+        logger.info("zyp \n【收到转账回调V3::分公司】:{}",notifyData);
+        try {
+//            String json = configService.selectConfigByKey("redPacket.config");
+            String json = companyConfigMapper.selectRedPacketConfigByKey(companyId);
+            RedPacketConfig config = JSONUtil.toBean(json, RedPacketConfig.class);
+
+            //创建微信订单
+            WxPayConfig payConfig = new WxPayConfig();
+            BeanUtils.copyProperties(config,payConfig);
+            WxPayService wxPayService = new WxPayServiceImpl();
+            wxPayService.setConfig(payConfig);
+            SignatureHeader signatureHeader = new SignatureHeader();
+            signatureHeader.setTimeStamp(request.getHeader("Wechatpay-Timestamp"));
+            signatureHeader.setNonce(request.getHeader("Wechatpay-Nonce"));
+            signatureHeader.setSerial(request.getHeader("Wechatpay-Serial"));
+            signatureHeader.setSignature(request.getHeader("Wechatpay-Signature"));
+            TransferBillsNotifyResult result = wxPayService.parseTransferBillsNotifyV3Result(notifyData,signatureHeader);
+            logger.info("到零钱回调1:{}",result.getResult());
+            if (result.getResult().getState().equals("SUCCESS")) {
+                R r = redPacketLogService.syncRedPacket(result.getResult().getOutBillNo(),result.getResult().getTransferBillNo());
+                logger.info("result:{}",r);
+                if (r.get("code").equals(200)){
+                    return WxPayNotifyResponse.success("处理成功");
+                }else {
+                    return WxPayNotifyResponse.fail("");
+                }
+            }else {
+                return WxPayNotifyResponse.fail("");
+            }
+        } catch (WxPayException e) {
+            e.printStackTrace();
+            logger.error("zyp \n【转账回调异常】:{}", e.getReturnMsg());
+            return WxPayNotifyResponse.fail(e.getMessage());
+        }
+    }
+
     @Override
     @Transactional
     public R sendRedPacketTest(WxSendRedPacketParam param) {

+ 12 - 5
fs-service/src/main/java/com/fs/live/service/impl/LiveServiceImpl.java

@@ -55,6 +55,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.util.EntityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import com.fs.common.utils.sign.Md5Utils;
@@ -123,7 +124,7 @@ public class LiveServiceImpl implements ILiveService
     private CompanyMapper companyMapper;
     @Autowired
     private LiveCouponMapper liveCouponMapper;
-    
+
     @Autowired
     LiveTagConfigMapper liveTagConfigMapper;
 
@@ -282,7 +283,7 @@ public class LiveServiceImpl implements ILiveService
             }
         }
         liveVo.setCompletionPointsEnabled(completionPointsEnabled);
-        
+
         LiveVideo liveVideo = liveVideoService.selectLiveVideoByLiveIdAndType(id, 3);
         if (liveVideo != null) {
             liveVo.setPreviewUrl(liveVideo.getVideoUrl());
@@ -636,7 +637,7 @@ public class LiveServiceImpl implements ILiveService
             liveTagConfigMapper.deleteByLiveId(live.getLiveId());
             insertLiveTagConfig(live.getLiveTagList(),live.getLiveId(),live.getCreateBy());
         }
-        
+
         return result;
     }
 
@@ -937,8 +938,14 @@ public class LiveServiceImpl implements ILiveService
         if (live.getCompanyId() != null && exist.getCompanyId() != null && !Objects.equals(exist.getCompanyId(), live.getCompanyId())) {
             return R.error("您没有权限操作此直播间");
         }
-        String rtmpPushUrl = generateRtmpPushUrl("rtmp://200149.push.tlivecloud.com", "live", exist.getLiveId().toString());
-        String hlvPlayUrl = generateHlvPlayUrl("https://live.test.ifeiyu100.com", "live", exist.getLiveId().toString());
+
+        SysConfig sysConfig = sysConfigService.selectConfigByConfigKey("living.config");
+        Map<String, String> livingConfigMap = JSON.parseObject(sysConfig.getConfigValue(), Map.class);
+        if (livingConfigMap == null || livingConfigMap.isEmpty()) {
+            return R.error("缺失直播配置");
+        }
+        String rtmpPushUrl = generateRtmpPushUrl(livingConfigMap.get("domain"), livingConfigMap.get("app"), exist.getLiveId().toString());
+        String hlvPlayUrl = generateHlvPlayUrl(livingConfigMap.get("http"), livingConfigMap.get("app"), exist.getLiveId().toString());
         Date now = new Date();
         exist.setRtmpUrl(rtmpPushUrl);
         exist.setFlvHlsUrl(hlvPlayUrl);

+ 6 - 0
fs-service/src/main/resources/mapper/his/FsUserMapper.xml

@@ -92,6 +92,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="registerCode != null   and registerCode != '' ">and register_code = #{registerCode}</if>
             <if test="source != null  and source != '' ">and source = #{source}</if>
             <if test="isShow != null  ">and is_show = #{isShow}</if>
+            <if test="keywords != null  and keywords != ''">
+                AND (fs_user.nick_name LIKE concat( #{keywords},'%')
+                or  fs_user.phone = #{keywords}
+                or fs_user.user_id = #{keywords}
+                )
+            </if>
             <!--<if test="qwRepeat != null  ">and qw_repeat = #{qwRepeat}</if>
             <if test="userRepeat != null  ">and user_repeat = #{userRepeat}</if>-->
 <!--            <if test="payOrder != null  ">and pay_order = #{payOrder}</if>-->

+ 15 - 0
fs-user-app/src/main/java/com/fs/app/controller/course/CourseTransferController.java

@@ -71,6 +71,21 @@ public class CourseTransferController {
         return paymentService.TransferNotifyWithCompanyId(companyId,notifyData,request);
     }
 
+    /**
+     * 分公司配置回调地址
+     * @param companyId
+     * @param notifyData
+     * @param request
+     * @param response
+     * @return
+     * @throws Exception
+     */
+    @PostMapping( "/v3TransferNotifyWithCompanyId/{companyId}")
+    public String v3TransferNotifyWithCompanyId(@PathVariable("companyId") Long companyId,@RequestBody String notifyData,HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+        return paymentService.v3TransferNotifyWithCompanyId(companyId,notifyData,request);
+    }
+
     @Autowired
     private IFsCourseRedPacketLogService fsCourseRedPacketLogService;