소스 검색

Merge remote-tracking branch 'origin/企微聊天' into 企微聊天

yh 1 주 전
부모
커밋
12df858fff

+ 62 - 0
fs-admin/src/main/java/com/fs/qw/controller/QwExternalContactController.java

@@ -2,13 +2,19 @@ package com.fs.qw.controller;
 
 import java.util.List;
 import java.util.Objects;
+import java.util.stream.Collectors;
 
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.fs.common.core.domain.R;
 import com.fs.common.exception.ServiceException;
+import com.fs.common.utils.StringUtils;
+import com.fs.course.service.IFsUserCompanyBindService;
+import com.fs.course.vo.UserWatchLogListVo;
 import com.fs.qw.param.QwExternalContactParam;
+import com.fs.qw.param.QwExternalContactRepeatParam;
 import com.fs.qw.param.QwTagSearchParam;
+import com.fs.qw.param.UserWatchLogParam;
 import com.fs.qw.service.IQwExternalContactInfoService;
 import com.fs.qw.service.IQwTagService;
 import com.fs.qw.vo.QwExternalContactUnionIdExportVO;
@@ -49,6 +55,8 @@ public class QwExternalContactController extends BaseController
 
     @Autowired
     private IQwExternalContactInfoService qwExternalContactInfoService;
+    @Autowired
+    private IFsUserCompanyBindService fsUserCompanyBindService;
 
     QwExternalContactController(IQwExternalContactService qwExternalContactService,IQwTagService iQwTagService){
         this.qwExternalContactService=qwExternalContactService;
@@ -181,4 +189,58 @@ public class QwExternalContactController extends BaseController
         return R.ok().put("data",qwExternalContactInfoService.selectQwExternalContactInfoByExternalContactId(id));
     }
 
+    /**
+     * 查询企业微信客户列表(重粉)
+     */
+    @PreAuthorize("@ss.hasPermi('qw:externalContact:listRepeat')")
+    @GetMapping("/listRepeat")
+    public TableDataInfo listRepeat(QwExternalContactParam qwExternalContact)
+    {
+        startPage();
+        if(StringUtils.isNotEmpty(qwExternalContact.getStatuses())){
+            String[] split = qwExternalContact.getStatuses().split(",");
+            qwExternalContact.setStatusCondition(split);
+        }
+        List<QwExternalContactVO> list = qwExternalContactService.selectQwExternalContactListVO(qwExternalContact);
+
+        return getDataTable(list);
+    }
+
+
+    /**
+     * 重粉看课记录查询
+     */
+    @GetMapping("/getWatchLogList")
+    public TableDataInfo getWatchLogList(UserWatchLogParam param){
+        startPage();
+        List<UserWatchLogListVo> list= fsUserCompanyBindService.getWatchLogList(param);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出重粉记录
+     */
+    @PostMapping("/exportRepeatExternalContact")
+    @PreAuthorize("@ss.hasPermi('his:user:exportRepeat')")
+    @Log(title = "导出重粉记录", businessType = BusinessType.EXPORT)
+    public AjaxResult exportRepeatExternalContact(@RequestBody QwExternalContactRepeatParam param){
+        if(StringUtils.isNotEmpty(param.getStatuses())){
+            String[] split = param.getStatuses().split(",");
+            param.setStatusCondition(split);
+        }
+        List<Long> userIds = param.getUserIds();
+        if (userIds==null || userIds.isEmpty()){
+            List<QwExternalContactVO> list = qwExternalContactService.selectQwExternalContactListVO(param);
+            if (list!=null && !list.isEmpty()){
+                userIds = list.stream().filter(item -> (item.getFsUserId() != null && item.getFsUserId() > 0)).map(QwExternalContactVO::getFsUserId).distinct().collect(Collectors.toList());
+            }
+        } else {
+            userIds = userIds.stream().filter(Objects::nonNull).distinct().collect(Collectors.toList());
+        }
+
+        List<UserWatchLogListVo> vos  = fsUserCompanyBindService.getWatchLogListByUserIds(userIds);
+        ExcelUtil<UserWatchLogListVo> util = new ExcelUtil<>(UserWatchLogListVo.class);
+        return util.exportExcel(vos, "企业微信重粉客户数据");
+    }
+
 }

+ 20 - 4
fs-admin/src/main/java/com/fs/qw/controller/QwUserController.java

@@ -34,14 +34,13 @@ import com.fs.qwApi.domain.inner.FollowInfo;
 import com.fs.qwApi.param.QwExternalListParam;
 import com.fs.qwApi.service.QwApiService;
 import com.fs.voice.utils.StringUtil;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -97,6 +96,23 @@ public class QwUserController extends BaseController {
         return  R.ok().put("data",list);
     }
 
+    /**
+     * 根据销售名称模糊查询
+     * @param qwUserName  名称
+     * @return  list
+     */
+    @GetMapping("/getQwUserListLikeName")
+    public R getQwUserListLikeName(@RequestParam(required = false) String qwUserName,
+                                   @RequestParam(required = false, defaultValue = "1") Integer pageNum,
+                                   @RequestParam(required = false, defaultValue = "10") Integer pageSize) {
+        Map<String,Object> params = new HashMap<>();
+        params.put("qwUserName", qwUserName);
+
+        PageHelper.startPage(pageNum, pageSize);
+        List<QwOptionsVO> qwUserList = companyUserService.selectQwUserListLikeName(params);
+        return R.ok().put("data", new PageInfo<>(qwUserList));
+    }
+
     /**
      * 绑定企微用户
      */

+ 1 - 0
fs-service/src/main/java/com/fs/course/vo/UserWatchLogListVo.java

@@ -26,6 +26,7 @@ public class UserWatchLogListVo {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 4)
     private Date createTime;
+    @Excel(name = "客户名称",sort = 1)
     private String fsUserName;
     @Excel(name = "所属项目",sort = 3)
     private String projectName;

+ 1 - 0
fs-service/src/main/java/com/fs/gtPush/service/impl/uniPush2ServiceImpl.java

@@ -17,6 +17,7 @@ import com.fs.gtPush.service.uniPush2Service;
 import com.fs.im.service.OpenIMService;
 import com.fs.system.domain.SysConfig;
 import com.fs.system.service.ISysConfigService;
+import com.qiniu.util.Json;
 import org.springframework.beans.factory.annotation.Autowired;
 import com.fs.gtPush.utils.PushUtils;
 import com.fs.his.domain.FsUser;

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

@@ -186,6 +186,10 @@ public class FsUser extends BaseEntity
     /** app登录后不为null(表示是否下载app) */
     private String historyApp;
 
+    private String appOpenId;
+
+    private String appleKey; // 苹果key登陆验证
+
     public void setNickName(String nickname)
     {
         if(StringUtils.isNotEmpty(nickname)){

+ 1 - 0
fs-service/src/main/java/com/fs/his/enums/FsStoreOrderLogEnum.java

@@ -33,6 +33,7 @@ public enum FsStoreOrderLogEnum {
     PLATFORM_REVIEW_SALES("PLATFORM_REVIEW_SALES","平台已审核"),
     WAREHOUSE_REVIEW_SALES("WAREHOUSE_REVIEW_SALES","仓库已审核"),
     FINANCE_REVIEW_SALES("FINANCE_REVIEW_SALES","财务已审核"),
+    SYS_REVIEW_SALES("SYS_REVIEW_SALES","后台退款"),
     PLATFORM_REVIEW_CANCEL("PLATFORM_REVIEW_CANCEL","平台已取消售后"),
 
     SET_PUSH_MOBILE("SET_PUSH_MOBILE","设置推送手机号"),

+ 8 - 0
fs-service/src/main/java/com/fs/his/mapper/FsUserMapper.java

@@ -471,4 +471,12 @@ public interface FsUserMapper
     List<FsUser> selectFsUserListByPhone(String phone);
 
     void updatePasswordByPhone(@Param("password")String password, @Param("encryptPhone")String encryptPhone);
+
+    /**
+     * 查询用户列表(用于积分管理,支持手机号和昵称模糊查询)
+     */
+    List<FsUser> selectFsUserListForIntegral(FsUser fsUser);
+
+    @Select("select * from fs_user where apple_key = #{appleKey}")
+    FsUser findUserByAppleKey(String appleKey);
 }

+ 169 - 58
fs-service/src/main/java/com/fs/his/service/impl/FsStorePaymentServiceImpl.java

@@ -11,6 +11,7 @@ import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.TimeUnit;
 
 import cn.binarywang.wx.miniapp.api.WxMaService;
+import cn.hutool.core.date.DateTime;
 import cn.hutool.core.util.IdUtil;
 import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSONObject;
@@ -46,16 +47,16 @@ import com.fs.course.service.IFsUserCourseOrderService;
 import com.fs.course.service.IFsUserVipOrderService;
 import com.fs.his.domain.*;
 import com.fs.his.dto.PayConfigDTO;
+import com.fs.his.enums.FsStoreAfterSalesStatusEnum;
+import com.fs.his.enums.FsStoreOrderLogEnum;
+import com.fs.his.enums.FsStoreOrderStatusEnum;
 import com.fs.his.enums.PaymentMethodEnum;
 import com.fs.his.mapper.*;
 import com.fs.his.param.*;
-import com.fs.his.service.IFsInquiryOrderService;
+import com.fs.his.service.*;
 
 import com.fs.his.param.WxSendRedPacketParam;
 import com.fs.his.service.IFsInquiryOrderService;
-import com.fs.his.service.IFsPackageOrderService;
-import com.fs.his.service.IFsStoreOrderService;
-import com.fs.his.service.IFsStorePaymentService;
 import com.fs.his.utils.PhoneUtil;
 import com.fs.his.vo.FsStorePaymentExcelVO;
 import com.fs.his.vo.FsStorePaymentVO;
@@ -69,6 +70,7 @@ import com.fs.huifuPay.domain.HuiFuRefundResult;
 import com.fs.huifuPay.domain.HuifuCreateOrderResult;
 import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayQueryRequest;
 import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayRefundRequest;
+import com.fs.huifuPay.sdk.opps.core.request.V2TradePaymentScanpayRefundqueryRequest;
 import com.fs.huifuPay.sdk.opps.core.utils.HuiFuUtils;
 import com.fs.huifuPay.service.HuiFuService;
 import com.fs.system.domain.SysConfig;
@@ -218,6 +220,24 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
     @Autowired
     private FsStorePaymentErrorMapper fsStorePaymentErrorMapper;
 
+    @Autowired
+    private FsStoreAfterSalesMapper fsStoreAfterSalesMapper;
+
+    @Autowired
+    private FsStoreAfterSalesLogsMapper fsStoreAfterSalesLogsMapper;
+
+    @Autowired
+    private IFsStoreOrderLogsService fsStoreOrderLogsService;
+
+    @Autowired
+    private FsStoreOrderLogsMapper fsStoreOrderLogsMapper;
+
+    @Autowired
+    FsPackageOrderMapper fsPackageOrderMapper;
+
+    @Autowired
+    FsInquiryOrderMapper inquiryOrderMapper;
+
     /**
      * 红包账户锁
      */
@@ -337,69 +357,158 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
     }
 
     @Override
+    @Transactional
     public String updateFsStorePaymentByDecryptForm(Long paymentId) {
         FsStorePayment fsStorePayment = fsStorePaymentMapper.selectFsStorePaymentByPaymentId(paymentId);
-        logger.info("手动查询单号:" + paymentId + ":" + fsStorePayment);
-        if (fsStorePayment.getPayMode().equals("tz")) {
-            payQueryOrder payQueryOrder = new payQueryOrder();
-            payQueryOrder.setOrderFlowNo(fsStorePayment.getTradeNo());
-            TzBankResult<QueryOrderResult> result = tzBankService.queryOrder(payQueryOrder);
-            logger.info("手动查询内容:" + paymentId + ":" + result);
-            if (result.getRetType().equals("S") && result.getBody().getStatus().equals("90")) {
-                QueryOrderResult body = result.getBody();
-                logger.info("手动回调内容:" + body);
-                if (fsStorePayment.getBusinessType() == 1) {
-                    inquiryOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), body.getPayType(), 1,null,null);
-                } else if (fsStorePayment.getBusinessType() == 2) {
-                    storeOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), body.getPayType(), 1,null,null);
-                } else if (fsStorePayment.getBusinessType() == 3) {
-                    packageOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), body.getPayType(), 1,null,null);
-                }else if (fsStorePayment.getBusinessType() == 4) {
-                    courseOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "", 1,null,null);
-                }else if (fsStorePayment.getBusinessType() == 5) {
-                    vipOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "", 1,null,null);
+        if (fsStorePayment != null && fsStorePayment.getStatus() == 1) {
+            //退款同步
+            if (fsStorePayment.getPayMode().equals("hf")) {
+                V2TradePaymentScanpayRefundqueryRequest refundQueryRequest = new V2TradePaymentScanpayRefundqueryRequest();
+                // 退款请求日期
+                refundQueryRequest.setOrgReqDate(new SimpleDateFormat("yyyyMMdd").format(DateUtils.getNowDate()));
+//                refundQueryRequest.setOrgReqDate("20260128");
+                //自己传的
+                refundQueryRequest.setOrgReqSeqId("refund-"+fsStorePayment.getPayCode());
+                refundQueryRequest.setAppId(fsStorePayment.getAppId());
+                try {
+                    HuiFuRefundResult huiFuRefundResult = huiFuService.queryRefundOrder(refundQueryRequest);
+                    Long packageOrderId = Long.valueOf(fsStorePayment.getBusinessId());
+                    logger.info("订单查询退款返回结果:退款订单id:" + packageOrderId + huiFuRefundResult);
+                    if ((huiFuRefundResult.getResp_code().equals("00000000") || huiFuRefundResult.getResp_code().equals("00000100"))) {
+                        if(huiFuRefundResult.getBank_message().contains("成功")){
+                            FsStorePayment paymentMap = new FsStorePayment();
+                            paymentMap.setPaymentId(fsStorePayment.getPaymentId());
+                            paymentMap.setStatus(-1);
+                            paymentMap.setRefundTime(DateUtils.getNowDate());
+                            paymentMap.setRefundMoney(new BigDecimal(huiFuRefundResult.getActual_ref_amt()));
+                            fsStorePaymentMapper.updateFsStorePayment(paymentMap);
+
+                            if (packageOrderId != null) {
+                                String orderType = "package";
+                                FsPackageOrder fsPackageOrder = fsPackageOrderMapper.selectFsPackageOrderByOrderId(packageOrderId);
+                                if (fsPackageOrder != null) {
+                                    fsPackageOrder.setStatus(-2);
+                                    fsPackageOrder.setRefundStatus(2);
+                                    fsPackageOrderMapper.updateFsPackageOrder(fsPackageOrder);
+                                }
+                                if (fsPackageOrder.getInquiryOrderId() != null) {
+                                    FsInquiryOrder fsInquiryOrder = new FsInquiryOrder();
+                                    fsInquiryOrder.setOrderId(fsPackageOrder.getInquiryOrderId());
+                                    fsInquiryOrder.setStatus(-2);
+                                    inquiryOrderMapper.updateFsInquiryOrder(fsInquiryOrder);
+                                }
+                                Long orderId = fsPackageOrder.getStoreOrderId();
+                                if (orderId != null) {
+                                    FsStoreAfterSales queryParam = new FsStoreAfterSales();
+                                    queryParam.setOrderId(orderId);
+                                    List<FsStoreAfterSales> fsStoreAfterSalesList = fsStoreAfterSalesMapper.selectFsStoreAfterSalesList(queryParam);
+                                    if (fsStoreAfterSalesList != null && fsStoreAfterSalesList.size() > 0) {
+                                        //更改售后订单状态
+                                        FsStoreAfterSales fsStoreAfterSales = fsStoreAfterSalesList.get(0);
+                                        fsStoreAfterSales.setId(fsStoreAfterSales.getId());
+                                        fsStoreAfterSales.setStatus(4);
+                                        fsStoreAfterSales.setSalesStatus(3);
+                                        int i = fsStoreAfterSalesMapper.updateFsStoreAfterSales(fsStoreAfterSales);
+                                        FsStoreAfterSalesLogs logs = new FsStoreAfterSalesLogs();
+                                        logs.setChangeTime(new DateTime());
+                                        logs.setChangeType(FsStoreAfterSalesStatusEnum.STATUS_4.getValue());
+                                        logs.setStoreAfterSalesId(fsStoreAfterSales.getId());
+                                        logs.setChangeMessage(FsStoreAfterSalesStatusEnum.STATUS_4.getDesc());
+                                        logs.setOperator(fsStoreAfterSales.getOperator());
+                                        fsStoreAfterSalesLogsMapper.insertFsStoreAfterSalesLogs(logs);
+                                    }
+
+
+                                    //添加订单日志
+                                    fsStoreOrderLogsService.create(orderId, FsStoreOrderLogEnum.SYS_REVIEW_SALES.getValue(),
+                                            "同步退款 " + FsStoreOrderLogEnum.SYS_REVIEW_SALES.getDesc());
+                                    //更改订单状态
+                                    FsStoreOrder or = new FsStoreOrder();
+                                    or.setOrderId(orderId);
+                                    or.setStatus(-2);
+                                    or.setRefundTime(DateUtils.getNowDate());
+                                    storeOrderService.updateFsStoreOrder(or);
+                                    FsStoreOrderLogs Logs = new FsStoreOrderLogs();
+                                    Logs.setChangeMessage(FsStoreOrderStatusEnum.REFUND_STATUS_2.getDesc());
+                                    Logs.setOrderId(orderId);
+                                    Logs.setChangeTime(new DateTime());
+                                    Logs.setChangeType(FsStoreOrderStatusEnum.REFUND_STATUS_2.getValue().toString());
+                                    fsStoreOrderLogsMapper.insertFsStoreOrderLogs(Logs);
+                                }
+
+                            }
+                        }
+                    } else {
+                        throw new CustomException("退款请求失败" + huiFuRefundResult.getResp_desc());
+                    }
+
+                } catch (Exception e) {
+                    throw new RuntimeException(e);
                 }
             }
-        }
-        if (fsStorePayment.getPayMode().equals("yb")) {
-            OrderQueryDTO o = new OrderQueryDTO();
-            o.setUpOrderId(fsStorePayment.getTradeNo());
-            OrderResult orderResult = ybPayService.getOrder(o);
-
-            if ("0".equals(orderResult.getState())) {
-                if (orderResult.getStatus().equals("100")) {
-                    logger.info("手动查询内容:" + paymentId + ":" + orderResult);
+
+        } else if (fsStorePayment != null && fsStorePayment.getStatus() == 0) {
+            logger.info("手动查询单号:" + paymentId + ":" + fsStorePayment);
+            if (fsStorePayment.getPayMode().equals("tz")) {
+                payQueryOrder payQueryOrder = new payQueryOrder();
+                payQueryOrder.setOrderFlowNo(fsStorePayment.getTradeNo());
+                TzBankResult<QueryOrderResult> result = tzBankService.queryOrder(payQueryOrder);
+                logger.info("手动查询内容:" + paymentId + ":" + result);
+                if (result.getRetType().equals("S") && result.getBody().getStatus().equals("90")) {
+                    QueryOrderResult body = result.getBody();
+                    logger.info("手动回调内容:" + body);
+                    if (fsStorePayment.getBusinessType() == 1) {
+                        inquiryOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), body.getPayType(), 1,null,null);
+                    } else if (fsStorePayment.getBusinessType() == 2) {
+                        storeOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), body.getPayType(), 1,null,null);
+                    } else if (fsStorePayment.getBusinessType() == 3) {
+                        packageOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), body.getPayType(), 1,null,null);
+                    }else if (fsStorePayment.getBusinessType() == 4) {
+                        courseOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "", 1,null,null);
+                    }else if (fsStorePayment.getBusinessType() == 5) {
+                        vipOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "", 1,null,null);
+                    }
+                }
+            }
+            if (fsStorePayment.getPayMode().equals("yb")) {
+                OrderQueryDTO o = new OrderQueryDTO();
+                o.setUpOrderId(fsStorePayment.getTradeNo());
+                OrderResult orderResult = ybPayService.getOrder(o);
+
+                if ("0".equals(orderResult.getState())) {
                     if (orderResult.getStatus().equals("100")) {
-                        if (fsStorePayment.getBusinessType() == 1) {
-                            inquiryOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "14", 1,null,null);
-                        } else if (fsStorePayment.getBusinessType() == 2) {
-                            storeOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "14", 1,null,null);
-                        } else if (fsStorePayment.getBusinessType() == 3) {
-                            packageOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "14", 1,null,null);
-                        }else if (fsStorePayment.getBusinessType() == 4) {
-                            courseOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "", 1,null,null);
-                        }else if (fsStorePayment.getBusinessType() == 5) {
-                            vipOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "", 1,null,null);
+                        logger.info("手动查询内容:" + paymentId + ":" + orderResult);
+                        if (orderResult.getStatus().equals("100")) {
+                            if (fsStorePayment.getBusinessType() == 1) {
+                                inquiryOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "14", 1,null,null);
+                            } else if (fsStorePayment.getBusinessType() == 2) {
+                                storeOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "14", 1,null,null);
+                            } else if (fsStorePayment.getBusinessType() == 3) {
+                                packageOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "14", 1,null,null);
+                            }else if (fsStorePayment.getBusinessType() == 4) {
+                                courseOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "", 1,null,null);
+                            }else if (fsStorePayment.getBusinessType() == 5) {
+                                vipOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "", 1,null,null);
+                            }
                         }
                     }
                 }
             }
-        }
-        if (fsStorePayment.getPayMode().equals("hf")) {
-            V2TradePaymentScanpayQueryRequest request = new V2TradePaymentScanpayQueryRequest();
-            request.setOrgReqDate(new SimpleDateFormat("yyyyMMdd").format(fsStorePayment.getCreateTime()));
-            request.setOrgHfSeqId(fsStorePayment.getTradeNo());
-            request.setAppId(fsStorePayment.getAppId());
-            HuiFuQueryOrderResult queryOrderResult = null;
-            try {
-                queryOrderResult = huiFuService.queryOrder(request);
-            } catch (Exception e) {
-                throw new RuntimeException(e);
-            }
-            logger.info("汇付返回"+queryOrderResult);
-            if ("00000000".equals(queryOrderResult.getResp_code())) {
-                if (queryOrderResult.getTrans_stat().equals("S")) {
-                    logger.info("手动查询内容:" + paymentId + ":" + request);
+            if (fsStorePayment.getPayMode().equals("hf")) {
+                V2TradePaymentScanpayQueryRequest request = new V2TradePaymentScanpayQueryRequest();
+                request.setOrgReqDate(new SimpleDateFormat("yyyyMMdd").format(fsStorePayment.getCreateTime()));
+                request.setOrgHfSeqId(fsStorePayment.getTradeNo());
+                request.setAppId(fsStorePayment.getAppId());
+                HuiFuQueryOrderResult queryOrderResult = null;
+                try {
+                    queryOrderResult = huiFuService.queryOrder(request);
+                } catch (Exception e) {
+                    throw new RuntimeException(e);
+                }
+                logger.info("汇付返回"+queryOrderResult);
+                if ("00000000".equals(queryOrderResult.getResp_code())) {
+                    if (queryOrderResult.getTrans_stat().equals("S")) {
+                        logger.info("手动查询内容:" + paymentId + ":" + request);
                         if (fsStorePayment.getBusinessType() == 1) {
                             inquiryOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "14", 1,queryOrderResult.getOut_trans_id(),queryOrderResult.getParty_order_id());
                         } else if (fsStorePayment.getBusinessType() == 2) {
@@ -412,9 +521,11 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
                             vipOrderService.payConfirm("", fsStorePayment.getPayCode(), fsStorePayment.getTradeNo(), "", 1,queryOrderResult.getOut_trans_id(),queryOrderResult.getParty_order_id());
                         }
 
+                    }
                 }
             }
         }
+
         return "同步完成";
 }
     @Autowired

+ 12 - 0
fs-service/src/main/java/com/fs/huifuPay/sdk/opps/core/request/V2TradePaymentScanpayRefundqueryRequest.java

@@ -37,6 +37,9 @@ public class V2TradePaymentScanpayRefundqueryRequest extends BaseRequest {
     @JSONField(name = "mer_ord_id")
     private String merOrdId;
 
+
+    private String appId;
+
     @Override
     public FunctionCodeEnum getFunctionCode() {
         return FunctionCodeEnum.V2_TRADE_PAYMENT_SCANPAY_REFUNDQUERY;
@@ -93,4 +96,13 @@ public class V2TradePaymentScanpayRefundqueryRequest extends BaseRequest {
         this.merOrdId = merOrdId;
     }
 
+
+    public String getAppId() {
+        return appId;
+    }
+
+    public void setAppId(String appId) {
+        this.appId = appId;
+    }
+
 }

+ 13 - 1
fs-service/src/main/java/com/fs/huifuPay/service/impl/HuiFuServiceImpl.java

@@ -190,7 +190,19 @@ public class HuiFuServiceImpl implements HuiFuService {
 
     @Override
     public HuiFuRefundResult queryRefundOrder(V2TradePaymentScanpayRefundqueryRequest request)throws Exception {
-        doInit(getMerConfig());
+        if (request.getAppId() != null) {
+            FsHfpayConfigMapper fsHfpayConfigMapper = SpringUtils.getBean(FsHfpayConfigMapper.class);
+            FsHfpayConfig fsHfpayConfig = fsHfpayConfigMapper.selectByAppId(request.getAppId());
+            if (fsHfpayConfig != null) {
+                //多汇付支付获取配置
+                doInit(getMerConfig(fsHfpayConfig));
+            } else {
+                //多小程序
+                doInit(getMerConfig());
+            }
+        } else {
+            doInit(getMerConfig());
+        }
         Map<String, Object> extendInfoMap = request.getExtendInfos();
         extendInfoMap.put("notify_url", config.getHfRefundNotifyUrl());
         request.setExtendInfo(extendInfoMap);

+ 1 - 0
fs-service/src/main/resources/mapper/his/FsStoreAfterSalesMapper.xml

@@ -62,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isPackage != null "> and is_package = #{isPackage}</if>
             <if test="packageJson != null  and packageJson != ''"> and package_json = #{packageJson}</if>
         </where>
+        order by id desc
     </select>
 
     <select id="selectFsStoreAfterSalesById" parameterType="Long" resultMap="FsStoreAfterSalesResult">

+ 23 - 1
fs-service/src/main/resources/mapper/his/FsUserMapper.xml

@@ -50,10 +50,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="qwUserId"    column="qw_user_id"    />
         <result property="appId"    column="app_id"    />
         <result property="level" column="level"/>
+        <result property="appOpenId"    column="app_open_id"    />
+        <result property="appleKey"    column="apple_key"    />
     </resultMap>
 
     <sql id="selectFsUserVo">
-        select user_id,qw_ext_id,sex,is_buy,`level`,course_ma_open_id,is_push,is_add_qw,source,login_device,is_individuation_push,store_open_id,password,jpush_id, is_vip,vip_start_date,vip_end_date,vip_level,vip_status,nick_name,integral_status, avatar, phone, integral,sign_num, status, tui_user_id, tui_time, tui_user_count, ma_open_id, mp_open_id, union_id, is_del, user_code, remark, create_time, update_time, last_ip, balance,is_weixin_auth,parent_id,qw_user_id,app_id,company_id,company_user_id,is_promoter,now_money,brokerage_price,spread_user_id, spread_time,pay_count, spread_count,user_type from fs_user
+        select user_id,qw_ext_id,sex,is_buy,`level`,course_ma_open_id,is_push,is_add_qw,source,login_device,is_individuation_push,store_open_id,password,jpush_id, is_vip,vip_start_date,vip_end_date,vip_level,vip_status,nick_name,integral_status, avatar, phone, integral,sign_num, status, tui_user_id, tui_time, tui_user_count, ma_open_id, mp_open_id, union_id, is_del, user_code, remark, create_time, update_time, last_ip, balance,is_weixin_auth,parent_id,qw_user_id,app_id,company_id,company_user_id,is_promoter,now_money,brokerage_price,spread_user_id, spread_time,pay_count, spread_count,user_type,app_open_id,apple_key from fs_user
     </sql>
 
     <select id="selectFsUserList" parameterType="FsUser" resultMap="FsUserResult">
@@ -589,6 +591,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="payCount != null">pay_count,</if>
             <if test="spreadCount != null">spread_count,</if>
             <if test="appId != null">app_id,</if>
+            <if test="appOpenId != null">app_open_id,</if>
+            <if test="appleKey != null">apple_key,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="nickName != null">#{nickName},</if>
@@ -639,6 +643,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="payCount != null">#{payCount},</if>
             <if test="spreadCount != null">#{spreadCount},</if>
             <if test="appId != null">#{appId},</if>
+            <if test="appOpenId != null">#{appOpenId},</if>
+            <if test="appleKey != null">#{appleKey},</if>
          </trim>
     </insert>
 
@@ -691,6 +697,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderCount != null">order_count = #{orderCount},</if>
             <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
             <if test="appId != null">app_id = #{appId},</if>
+            <if test="appOpenId != null">app_open_id = #{appOpenId},</if>
+            <if test="appleKey != null">apple_key = #{appleKey},</if>
         </trim>
         where user_id = #{userId}
     </update>
@@ -2432,6 +2440,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectFsUserListByPhone" resultType="com.fs.his.domain.FsUser">
         select * from fs_user where phone=#{phone}
     </select>
+    <!-- 查询用户列表(用于积分管理) -->
+    <select id="selectFsUserListForIntegral" parameterType="FsUser" resultMap="FsUserResult">
+        select user_id, nick_name, phone, integral from fs_user
+        <where>
+            and is_del = 0
+            <if test="phone != null and phone != ''">
+                and phone like concat('%', #{phone}, '%')
+            </if>
+            <if test="nickName != null and nickName != ''">
+                and (nick_name like concat('%', #{nickName}, '%') or nickname like concat('%', #{nickName}, '%'))
+            </if>
+        </where>
+        order by user_id desc
+    </select>
 
 
 </mapper>

+ 179 - 24
fs-user-app/src/main/java/com/fs/app/controller/AppLoginController.java

@@ -3,6 +3,7 @@ package com.fs.app.controller;
 
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.date.DateTime;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.fs.app.annotation.Login;
 import com.fs.app.param.*;
 import com.fs.app.utils.WxUtil;
@@ -14,6 +15,8 @@ import com.fs.common.exception.ServiceException;
 import com.fs.common.service.ISmsService;
 import com.fs.common.utils.sign.Md5Utils;
 import com.fs.core.config.WxOpenProperties;
+import com.fs.course.domain.FsCoursePlaySourceConfig;
+import com.fs.course.service.IFsCoursePlaySourceConfigService;
 import com.fs.his.config.FsSysConfig;
 import com.fs.his.domain.FsUser;
 import com.fs.his.domain.FsUserNewTask;
@@ -65,6 +68,9 @@ public class AppLoginController extends AppBaseController{
 
     @Autowired
     private ISmsService smsService;
+    @Autowired
+    private IFsCoursePlaySourceConfigService fsCoursePlaySourceConfigService;
+
     @ApiOperation("注册app用户")
     @PostMapping("/register")
     @RepeatSubmit
@@ -232,8 +238,29 @@ public class AppLoginController extends AppBaseController{
             if (StringUtils.isBlank(param.getCode())) {
                 return R.error("code不存在");
             }
-            logger.info("zyp app微信登录,param:{},输出appid,{},secret:{}", param, openProperties.getAppId(), openProperties.getSecret());
-            Map result = WxUtil.getAccessToken(param.getCode(), openProperties.getAppId(), openProperties.getSecret());
+
+            String appId = param.getAppId();
+            String appSecret = "";
+            if (StringUtils.isBlank(appId)) {
+                List<FsCoursePlaySourceConfig> list = fsCoursePlaySourceConfigService.list(new QueryWrapper<FsCoursePlaySourceConfig>().eq("name", "app").eq("is_del", 0));
+                if(!list.isEmpty()){
+                    FsCoursePlaySourceConfig fsCoursePlaySourceConfig = list.get(0);
+                    appId = fsCoursePlaySourceConfig.getAppid();
+                    appSecret =  fsCoursePlaySourceConfig.getSecret();
+                }
+            } else {
+                FsCoursePlaySourceConfig fsCoursePlaySourceConfig = fsCoursePlaySourceConfigService.getOne(new QueryWrapper<FsCoursePlaySourceConfig>().eq("appid", appId).eq("is_del", 0));
+                if(fsCoursePlaySourceConfig != null){
+                    appId = fsCoursePlaySourceConfig.getAppid();
+                    appSecret =  fsCoursePlaySourceConfig.getSecret();
+                }
+            }
+            if (StringUtils.isBlank(appId) || StringUtils.isBlank(appSecret)) {
+                appId = openProperties.getAppId();
+                appSecret = openProperties.getSecret();
+            }
+            logger.info("zyp app微信登录,param:{},输出appid,{},secret:{}", param, appId, appSecret);
+            Map result = WxUtil.getAccessToken(param.getCode(),appId,appSecret);
             String accessToken = result.get("access_token").toString();
             String unionid = result.get("unionid").toString();
 
@@ -253,12 +280,13 @@ public class AppLoginController extends AppBaseController{
                 user.setSource(param.getSource()!=null ? param.getSource() : null);
                 user.setNickName(nickname);
                 user.setAvatar(avatar);
+                user.setAppOpenId(openid);
                 if (sex!=0){
                     user.setSex(sex);
                 }
                 user.setUnionId(unionid);
                 // 新用户 - 添加 appId
-                user.setAppId(openProperties.getAppId());
+                user.setAppId(appId);
                 user.setCreateTime(new Date());
                 user.setStatus(1);
                 if (StringUtils.isNotEmpty(param.getJpushId())) {
@@ -270,15 +298,16 @@ public class AppLoginController extends AppBaseController{
                 return R.ok(map);
             } else {
                 // 老用户 - 检查并添加appId(不重复添加)
-                String updatedAppId = addAppIdIfNotExists(user.getAppId(), openProperties.getAppId());
+                String updatedAppId = addAppIdIfNotExists(user.getAppId(), appId);
                 if (!updatedAppId.equals(user.getAppId())) {
                     FsUser userMap = new FsUser();
                     userMap.setUserId(user.getUserId());
                     userMap.setAppId(updatedAppId);
                     userService.updateFsUser(userMap);
                 }
-                
+
                 if (StringUtils.isNotEmpty(param.getJpushId())) {
+                    user.setAppOpenId(openid);
                     updateExistingUserJpushId(user, param.getJpushId());
                 }
                 if (StringUtils.isEmpty(user.getPhone())) {
@@ -301,6 +330,91 @@ public class AppLoginController extends AppBaseController{
 
     }
 
+    @ApiOperation("苹果登录")
+    @PostMapping("/loginByApple")
+    @Transactional
+    public R loginByApple(@Validated @RequestBody FsUserLoginByAppleParam param) {
+        try {
+            if (StringUtils.isEmpty(param.getAppleKey())) {
+                return R.error("获取苹果key失败");
+            }
+            // 根据苹果key查询用户
+            FsUser user = userMapper.findUserByAppleKey(param.getAppleKey());
+            Map<String, Object> map = new HashMap<>();
+            if (user == null) {
+                map.put("isNew", true);
+                return R.ok(map);
+            } else {
+                if (StringUtils.isNotEmpty(param.getJpushId())) {
+                    updateExistingUserJpushId(user, param.getJpushId());
+                }
+                if (StringUtils.isEmpty(user.getPhone())) {
+                    map.put("isNew", true);
+                    return R.ok(map);
+                }
+            }
+            /*if (user.getStatus()==0){
+                return R.error("登录失败,账户被禁用");
+            }*/
+            int isFirstLogin = userNewTaskService.performTaskOne(user.getUserId());
+            String token = jwtUtils.generateToken(user.getUserId());
+            redisCache.setCacheObject("userToken:" + user.getUserId(), token, 604800, TimeUnit.SECONDS);
+            map.put("token", token);
+            map.put("user", user);
+            map.put("isFirst",isFirstLogin);
+            return R.ok(map);
+        }catch (Exception e){
+            logger.error("zyp 苹果登录失败:{}", e.getMessage());
+            return R.error("登录失败");
+        }
+    }
+
+    private FsUser createNewAppleUser(FsUserEditPhoneParam param, String phoneNumber) {
+        FsUser newUser = new FsUser();
+        newUser.setLoginDevice(param.getLoginDevice()!=null ? param.getLoginDevice() : null);
+        newUser.setSource(param.getSource()!=null ? param.getSource() : null);
+        newUser.setAppleKey(param.getAppleKey());
+        newUser.setPhone(param.getPhone());
+        newUser.setPassword(Md5Utils.hash(param.getPassword()));
+        newUser.setNickName("苹果用户" + param.getPhone().substring(param.getPhone().length() - 4));
+        newUser.setCreateTime(new Date());
+        newUser.setStatus(1);
+        newUser.setAvatar("https://cos.his.cdwjyyh.com/fs/20240926/420728ee06e54575ba82665dedb4756b.png");
+        if (StringUtils.isNotEmpty(param.getJpushId())) {
+            newUser.setJpushId(param.getJpushId());
+        }
+        userService.insertFsUser(newUser);
+        return newUser;
+
+    }
+
+    @ApiOperation("绑定手机号")
+    @PostMapping("/setIPhoneNumber")
+    public R setIPhoneNumber(@Validated @RequestBody FsUserEditPhoneParam param) {
+        FsUser userMap = findUserByPhone(param.getPhone());
+        if (userMap != null) {
+            if (StringUtils.isNotEmpty(userMap.getAppleKey()) && !param.getAppleKey().equals(userMap.getAppleKey())) {
+                return R.error("该手机号已绑定其他账号");
+            }
+            if (param.getSimExist() == 0 && !Md5Utils.hash(param.getPassword()).equals(userMap.getPassword())) {
+                return R.error("密码不正确");
+            }
+        } else {
+            userMap = createNewAppleUser(param, param.getPhone());
+        }
+
+        userMap.setLoginDevice(param.getLoginDevice());
+        userMap.setSource(param.getSource());
+        if (userMap.getNickName().equals("匿名用户**")) {
+            userMap.setNickName("苹果用户" + param.getPhone().substring(param.getPhone().length() - 4));
+        }
+        userMap.setAppleKey(param.getAppleKey());
+        if (userService.updateFsUser(userMap)>0){
+            return generateTokenAndReturn(userMap);
+        }
+        return R.error("绑定手机号失败");
+    }
+
     @PostMapping("/loginByPhone")
     public R loginByPhone(@RequestBody Map<String,String> map){
         String phone = map.get("phone");
@@ -358,6 +472,7 @@ public class AppLoginController extends AppBaseController{
 
     @ApiOperation("绑定手机号")
     @PostMapping("/setPhone")
+    @Transactional(rollbackFor = Exception.class)
     public R setPhone(@Validated @RequestBody FsUserEditPhoneParam param) {
         logger.info("fcj 绑定手机号入参:{}", param);
         FsUser user = userService.selectFsUserByUnionid(param.getUnionId());
@@ -367,15 +482,33 @@ public class AppLoginController extends AppBaseController{
         FsUser userMap = findUserByPhone(param.getPhone());
         //绑定的手机号已存在用户的情况,将微信登录的时候创建的新号的UnionId移动到老号中,删除新号(将两个号合并)
         if (userMap!=null){
+            if (userMap.getUserId().equals(user.getUserId())) {
+                user.setPhone(param.getPhone());
+                user.setLoginDevice(param.getLoginDevice());
+                user.setSource(param.getSource());
+                userService.updateFsUser(user);
+                return generateTokenAndReturn(user);
+            }
             if (StringUtils.isNotEmpty(userMap.getUnionId())&&!userMap.getUnionId().equals(user.getUnionId())){
                 return R.error("该手机号已绑定其他微信");
             }
-            userMap.setLoginDevice(param.getLoginDevice() != null ? param.getLoginDevice() : null);
-            userMap.setSource(param.getSource());
-            userMap.setUnionId(user.getUnionId());
-            if (userService.updateFsUser(userMap)>0){
-                userService.realDeleteFsUserByUserId(user.getUserId());
-                return generateTokenAndReturn(userMap);
+            //如果存在手机号也有用户,微信也有用户,保留创建时间比较久的用户
+            FsUser keepUser;
+            FsUser deleteUser;
+            if (userMap.getCreateTime().before(user.getCreateTime())){
+                keepUser = userMap;
+                deleteUser = user;
+            }else {
+                keepUser = user;
+                deleteUser = userMap;
+            }
+            keepUser.setLoginDevice(param.getLoginDevice() != null ? param.getLoginDevice() : null);
+            keepUser.setSource(param.getSource());
+            keepUser.setUnionId(user.getUnionId());
+            keepUser.setPhone(param.getPhone());
+            if (userService.updateFsUser(keepUser)>0){
+                userService.realDeleteFsUserByUserId(deleteUser.getUserId());
+                return generateTokenAndReturn(keepUser);
             }
             return R.error("绑定手机号失败");
         }
@@ -395,6 +528,7 @@ public class AppLoginController extends AppBaseController{
 
     @ApiOperation("绑定微信")
     @PostMapping("/bindWeChat")
+    @Transactional(rollbackFor = Exception.class)
     public R bindWeChat(@Validated @RequestBody FsUserEditUnionidParam param) {
         try {
             logger.info("zyp app绑定微信,param:{}", param);
@@ -417,15 +551,33 @@ public class AppLoginController extends AppBaseController{
                     if (StringUtils.isNotEmpty(userByUnionId.getPhone())&&!user.getPhone().equals(userByUnionId.getPhone())){
                         return R.error("该微信已绑定其他手机号");
                     }
-                    userByUnionId.setPhone(param.getPhone());
-                    userByUnionId.setSource(param.getSource() != null ? param.getSource() : null );
-                    userByUnionId.setLoginDevice(param.getLoginDevice() != null ? param.getLoginDevice() : null);
-                    userByUnionId.setNickName(nickname);
-                    userByUnionId.setAvatar(avatar);
-                    userByUnionId.setSex(sex);
-                    if (userService.updateFsUser(userByUnionId)>0){
-                        userService.realDeleteFsUserByUserId(user.getUserId());
-                        return generateTokenAndReturn(userByUnionId);
+                    if (userByUnionId.getUserId().equals(user.getUserId())) {
+                        user.setPhone(param.getPhone());
+                        user.setLoginDevice(param.getLoginDevice());
+                        user.setSource(param.getSource());
+                        user.setUnionId(unionid);
+                        userService.updateFsUser(user);
+                        return generateTokenAndReturn(user);
+                    }
+                    FsUser keepUser;
+                    FsUser deleteUser;
+                    if (user.getCreateTime().before(userByUnionId.getCreateTime())){
+                        keepUser = user;
+                        deleteUser = userByUnionId;
+                    } else {
+                        keepUser = userByUnionId;
+                        deleteUser = user;
+                    }
+                    keepUser.setUnionId(unionid);
+                    keepUser.setPhone(param.getPhone());
+                    keepUser.setSource(param.getSource() != null ? param.getSource() : null );
+                    keepUser.setLoginDevice(param.getLoginDevice() != null ? param.getLoginDevice() : null);
+                    keepUser.setNickName(nickname);
+                    keepUser.setAvatar(avatar);
+                    keepUser.setSex(sex);
+                    if (userService.updateFsUser(keepUser)>0){
+                        userService.realDeleteFsUserByUserId(deleteUser.getUserId());
+                        return generateTokenAndReturn(keepUser);
                     }
                     else {
                         return R.error("绑定微信失败");
@@ -437,7 +589,7 @@ public class AppLoginController extends AppBaseController{
                     user.setAvatar(avatar);
                     user.setSex(sex);
                     user.setUnionId(unionid);
-//                    user.setAppOpenId(openid);
+                    user.setAppOpenId(openid);
                     if (userService.updateFsUser(user)>0){
                         return generateTokenAndReturn(user);
                     }else {
@@ -456,6 +608,9 @@ public class AppLoginController extends AppBaseController{
         FsUser userMap = new FsUser();
         userMap.setUserId(user.getUserId());
         userMap.setJpushId(jpushId);
+        if (StringUtils.isNotEmpty(user.getAppOpenId())) {
+            userMap.setAppOpenId(user.getAppOpenId());
+        }
         userService.updateFsUser(userMap);
     }
 
@@ -767,12 +922,12 @@ public class AppLoginController extends AppBaseController{
         if (StringUtils.isEmpty(newAppId)) {
             return currentAppIds == null ? "" : currentAppIds;
         }
-        
+
         // 如果当前appId为空,直接返回新appId
         if (StringUtils.isEmpty(currentAppIds)) {
             return newAppId;
         }
-        
+
         // 检查是否已存在
         String[] appIdArray = currentAppIds.split(",");
         for (String appId : appIdArray) {
@@ -781,7 +936,7 @@ public class AppLoginController extends AppBaseController{
                 return currentAppIds;
             }
         }
-        
+
         // 不存在,追加到末尾
         return currentAppIds + "," + newAppId;
     }

+ 9 - 0
fs-user-app/src/main/java/com/fs/app/param/FsUserEditPhoneParam.java

@@ -21,4 +21,13 @@ public class FsUserEditPhoneParam implements Serializable {
     private String jpushId;
 
     private String source;
+
+    private String appleKey;
+
+    private String password;
+
+    /**
+     * 是否有SIM卡 0不存在 1存在
+     */
+    private Integer simExist;
 }

+ 17 - 0
fs-user-app/src/main/java/com/fs/app/param/FsUserLoginByAppleParam.java

@@ -0,0 +1,17 @@
+package com.fs.app.param;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class FsUserLoginByAppleParam implements Serializable {
+    private String jpushId;
+
+    private String loginDevice;//当前登陆设备
+
+    private String source; //app来源
+
+    private String appleKey;
+
+}

+ 2 - 0
fs-user-app/src/main/java/com/fs/app/param/FsUserLoginByWeChatParam.java

@@ -17,4 +17,6 @@ public class FsUserLoginByWeChatParam implements Serializable {
     private String source; //app来源
 
     private Long userId;
+
+    private String appId; //主要用于app微信登录
 }