ct 2 dienas atpakaļ
vecāks
revīzija
c3961c7924

+ 5 - 5
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseOrderServiceImpl.java

@@ -542,7 +542,7 @@ public class FsUserCourseOrderServiceImpl implements IFsUserCourseOrderService
 //                        o.setOpenId(user.getMpOpenId());
                         o.setOrderType(4);
                         o.setOrderId(order.getOrderId().toString());
-                        o.setPayType(Arrays.asList(PayType.支付宝条码支付.getCode()));
+                        o.setPayType(Arrays.asList(PayType.ALIPAY_BARCODE_PAYMENT.getCode()));
                         TzBankResult<PayCreateOrderResult> result = tzBankService.createOrder(o);
                         FsStorePayment mt=new FsStorePayment();
                         mt.setPaymentId(storePayment.getPaymentId());
@@ -591,11 +591,11 @@ public class FsUserCourseOrderServiceImpl implements IFsUserCourseOrderService
                         paymentMap.setStatus(1);
                         paymentMap.setPayTime(new Date());
                         paymentMap.setTradeNo(tradeNo);
-                        if(payType.equals(PayType.微信小程序支付.getCode())){
-                            paymentMap.setPayTypeCode(PayType.微信小程序支付.name());
+                        if(payType.equals(PayType.WECHAT_MINI_PROGRAM_PAYMENT.getCode())){
+                            paymentMap.setPayTypeCode(PayType.WECHAT_MINI_PROGRAM_PAYMENT.name());
                         }
-                        else if(payType.equals(PayType.支付宝条码支付.getCode())){
-                            paymentMap.setPayTypeCode(PayType.支付宝条码支付.name());
+                        else if(payType.equals(PayType.ALIPAY_BARCODE_PAYMENT.getCode())){
+                            paymentMap.setPayTypeCode(PayType.ALIPAY_BARCODE_PAYMENT.name());
                         }
                         fsStorePaymentMapper.updateFsStorePayment(paymentMap);
                         order=fsUserCourseOrderMapper.selectFsUserCourseOrderByOrderId(Long.parseLong(storePayment.getBusinessId()));

+ 0 - 1
fs-service/src/main/java/com/fs/erp/dto/sdk/df/DfClient.java

@@ -4,7 +4,6 @@ package com.fs.erp.dto.sdk.df;
 import com.alibaba.fastjson.JSON;
 import com.fs.erp.dto.df.DFConfigVo;
 import com.fs.erp.dto.sdk.df.enums.RequestUrlEnum;
-import com.fs.erp.dto.sdk.df.utils.WebUtils;
 import com.fs.his.config.FsSysConfig;
 import com.fs.his.utils.ConfigUtil;
 import lombok.extern.slf4j.Slf4j;

+ 6 - 2
fs-service/src/main/java/com/fs/erp/service/impl/DfOrderServiceImpl.java

@@ -120,7 +120,7 @@ public class DfOrderServiceImpl implements IErpOrderService
                     Map<String,Object> orderResultQueryParam = new HashMap<>();
                     orderResultQueryParam.put("orderNumber",orderCode);
                     orderResultQueryParam.put("exInterfaceType",2); //2为查询取消订单结果
-                    getOrderResult(orderResultQueryParam,sfAccountIndex);
+//                    getOrderResult(orderResultQueryParam,sfAccountIndex);
                     ErpOrderResponse erpOrderResponse = new ErpOrderResponse();
                     erpOrderResponse.setCode(orderCode);
                     erpOrderResponse.setSuccess(true);
@@ -281,7 +281,11 @@ public class DfOrderServiceImpl implements IErpOrderService
                 Map<String,Object> orderResultQueryParam = new HashMap<>();
                 orderResultQueryParam.put("orderNumber",order.getPlatform_code());
                 orderResultQueryParam.put("exInterfaceType",df.getStatus());
-                getOrderResult(orderResultQueryParam,sfAccountIndex);
+//                try {
+//                    getOrderResult(orderResultQueryParam,sfAccountIndex);
+//                } catch (Exception e) {
+//
+//                }
                 ErpOrderResponse erpOrderResponse = new ErpOrderResponse();
                 erpOrderResponse.setCode(order.getPlatform_code());
                 erpOrderResponse.setSuccess(true);

+ 4 - 1
fs-service/src/main/java/com/fs/his/mapper/FsUserOperationLogMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.fs.his.domain.FsUserOperationLog;
 import com.fs.his.param.FsUserOperationLogQueryParam;
 import com.fs.his.vo.FsUserOperationLogPageVo;
+import com.fs.his.vo.FsUserOperationLogVo;
 
 /**
  * 用户操作日志Mapper接口
@@ -19,7 +20,7 @@ public interface FsUserOperationLogMapper extends BaseMapper<FsUserOperationLog>
      * @param logId 用户操作日志主键
      * @return 用户操作日志
      */
-    FsUserOperationLog selectFsUserOperationLogByLogId(Long logId);
+    FsUserOperationLogVo selectFsUserOperationLogByLogId(Long logId);
 
     /**
      * 查询用户操作日志列表
@@ -60,4 +61,6 @@ public interface FsUserOperationLogMapper extends BaseMapper<FsUserOperationLog>
      * @return 结果
      */
     int deleteFsUserOperationLogByLogIds(Long[] logIds);
+
+    List<FsUserOperationLogVo> selectFsUserOperationLogByList(FsUserOperationLog fsUserOperationLog);
 }

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

@@ -19,6 +19,7 @@ import com.fs.his.dto.ExpressResultDTO;
 import com.fs.his.dto.StoreOrderExpressExportDTO;
 import com.fs.his.param.*;
 import com.fs.his.vo.*;
+import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 订单Service接口
@@ -153,6 +154,9 @@ public interface IFsStoreOrderService
 
     void addFsFollowByStoreOrder(FsStoreOrder order);
 
+    @Transactional
+    R finishStoreOrder(Long orderId);
+
     List<FsStoreOrderExportVO> selectFsStoreOrderListVOByExport(FsStoreOrderParam param);
 
     List<FsInquiryOrderMsg> selectFsInquiryOrderMsgByStoreOrderId(FsFollowMsgParam fsFollowMsgParam);

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

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.fs.his.domain.FsUserOperationLog;
 import com.fs.his.param.FsUserOperationLogQueryParam;
 import com.fs.his.vo.FsUserOperationLogPageVo;
+import com.fs.his.vo.FsUserOperationLogVo;
 import com.github.pagehelper.PageInfo;
 
 /**
@@ -22,6 +23,9 @@ public interface IFsUserOperationLogService extends IService<FsUserOperationLog>
      */
     FsUserOperationLog selectFsUserOperationLogByLogId(Long logId);
 
+
+    List<FsUserOperationLogVo> selectFsUserOperationLogByList(FsUserOperationLog fsUserOperationLog);
+
     /**
      * 查询用户操作日志列表
      *

+ 19 - 1
fs-service/src/main/java/com/fs/his/service/impl/FsStoreAfterSalesServiceImpl.java

@@ -100,6 +100,14 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService {
     @Qualifier("hzOMSErpOrderServiceImpl")
     private IErpOrderService hzOMSerpOrderService;
 
+    @Autowired
+    @Qualifier("dfOrderServiceImpl")
+    private IErpOrderService dfOrderService;
+
+    @Autowired
+    @Qualifier("wdtErpOrderServiceImpl")
+    private IErpOrderService wdtErpOrderService;
+
     @Autowired
     private FsStorePaymentMapper fsStorePaymentMapper;
     @Autowired
@@ -537,9 +545,14 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService {
                     Integer erpType = sysConfig.getErpType();
                     if (erpType == 1) {
                         erpOrderService.refundUpdate(request);
+                    }else if (erpType == 2) {
+                        //旺店通
+                        wdtErpOrderService.refundUpdate(request);
                     } else if (erpType == 3) {
                         //瀚智
                         hzOMSerpOrderService.refundUpdate(request);
+                    }  else if (erpType == 4) {
+                        dfOrderService.refundUpdate(request);
                     }
                 }
             }
@@ -694,9 +707,14 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService {
             BaseResponse response = null;
             if (erpType == 1) {
                 response =  erpOrderService.refundUpdate(request);
-            } else if (erpType == 3) {
+            }else if (erpType == 2) {
+                //旺店通
+                response = wdtErpOrderService.refundUpdate(request);
+            }  else if (erpType == 3) {
                 //瀚智
                 response =  hzOMSerpOrderService.refundUpdate(request);
+            } else if (erpType == 4) {
+                response =  dfOrderService.refundUpdate(request);
             }
             if (response.getSuccess()) {
                 return R.ok();

+ 80 - 202
fs-service/src/main/java/com/fs/his/service/impl/FsStoreOrderServiceImpl.java

@@ -85,16 +85,18 @@ import com.google.gson.Gson;
 import lombok.Synchronized;
 import lombok.extern.slf4j.Slf4j;
 import org.json.JSONObject;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.springframework.aop.framework.AopContext;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.ApplicationEventPublisher;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
+import org.springframework.util.CollectionUtils;
 
 import java.lang.reflect.Field;
 import java.math.BigDecimal;
@@ -118,9 +120,9 @@ import static com.fs.his.utils.PhoneUtil.encryptPhone;
 @Lazy
 @Service
 @Slf4j
+@EnableAspectJAutoProxy(exposeProxy = true,proxyTargetClass = true)
 public class FsStoreOrderServiceImpl implements IFsStoreOrderService
 {
-    Logger logger= LoggerFactory.getLogger(getClass());
     @Autowired
     private WxPayService wxPayService;
     @Autowired
@@ -161,15 +163,15 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
     @Autowired
     private IFsExpressService expressService;
     @Autowired
-    HisApiService hisApiService;
+    private HisApiService hisApiService;
     @Autowired
-    FsInquiryOrderMapper fsInquiryOrderMapper;
+    private FsInquiryOrderMapper fsInquiryOrderMapper;
     @Autowired
     private ICompanyService companyService;
     @Autowired
     private CompanyMapper companyMapper;
     @Autowired
-    ICompanyUserService companyUserService;
+    private ICompanyUserService companyUserService;
     @Autowired
     private IFsUserService userService;
     @Autowired
@@ -235,30 +237,28 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
     @Autowired
     private IFsInquiryOrderService inquiryOrderService;
     @Autowired
-    FsFollowReportMapper fsFollowReportMapper;
+    private FsFollowReportMapper fsFollowReportMapper;
     @Autowired
-    FsStoreSubOrderServiceImpl storeSubOrderService;
+    private FsStoreSubOrderServiceImpl storeSubOrderService;
     @Autowired
-    ApplicationEventPublisher publisher;
+    private ApplicationEventPublisher publisher;
 
     @Autowired
-    IFsUserWatchService fsUserWatchService;
+    private IFsUserWatchService fsUserWatchService;
     @Autowired
-    QwExternalContactMapper qwExternalContactMapper;
-    @Autowired
-    QwSopLogsMapper qwSopLogsMapper;
-
-    @Autowired
-    private IFsExportTaskService exportTaskService;
+    private QwExternalContactMapper qwExternalContactMapper;
     @Autowired
     private QwUserServiceImpl qwUserServiceImpl;
     @Autowired
     private IFsStoreProductGroupService storeProductGroupService;
     @Autowired
-    CloudHostProper cloudHostProper;
+    private CloudHostProper cloudHostProper;
     @Autowired
-    private FsErpFinishPushMapper fsErpFinishPushMapper;
+    private IFsPrescribeService fsPrescribeService;
+
 
+    @Value("${express.omsCode}")
+    private String expressOmsCode;
     /**
      * 查询订单
      *
@@ -401,9 +401,9 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
         o1.setFinishTime(new Date());
         o1.setOrderId(orderId);
         o1.setStatus(FsStoreOrderStatusEnum.STATUS_4.getValue());
-        logger.info("确认收货:"+orderId);
+        log.info("确认收货:"+orderId);
         if (order.getCompanyId()!=null&&order.getTuiMoneyStatus()==0&&order.getPayType()==1){
-            logger.info("分佣:"+orderId);
+            log.info("分佣:"+orderId);
             companyService.addCompanyMoney(order);
             o1.setTuiMoneyTime(new Date());
         }
@@ -451,19 +451,11 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                 userCouponService.updateFsUserCoupon(userCoupon);
             }
             //退回库存
-//            this.refundStock(order);
             fsStoreOrderMapper.cancelOrder(orderId);
             //添加记录
             fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.CANCEL_ORDER.getValue(),
                     FsStoreOrderLogEnum.CANCEL_ORDER.getDesc());
 
-//            TemplateBean templateBean = TemplateBean.builder()
-//                    .orderId(order.getOrderId().toString())
-//                    .remark("您的订单已取消")
-//                    .uid(order.getUserId())
-//                    .templateType(TemplateListenEnum.TYPE_1.getValue())
-//                    .build();
-//            publisher.publishEvent(new TemplateEvent(this, templateBean));
             return R.ok("操作成功");
         }
         else{
@@ -487,7 +479,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                         //判断完成时间是否超过指定时间
                         Calendar calendar = new GregorianCalendar();
                         calendar.setTime(vo.getFinishTime());
-                        calendar.add(calendar.DATE,storeConfig.getStoreAfterSalesDay()); //把日期往后增加一天,整数  往后推,负数往前移动
+                        //把日期往后增加一天,整数  往后推,负数往前移动
+                        calendar.add(calendar.DATE,storeConfig.getStoreAfterSalesDay());
                         if(calendar.getTime().getTime()<new Date().getTime()){
                             vo.setIsAfterSales(0);
                         }
@@ -611,24 +604,17 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
         FsPackage fsPackage=fsPackageMapper.selectFsPackageByPackageId(packageOrder.getPackageId());
         JSONArray objects =JSONUtil.parseArray(fsPackage.getProductJson());
         List<FsPackagePruductDTO> products=JSONUtil.toList(objects,FsPackagePruductDTO.class);
-//        boolean isDrug=false;
-//        for (FsPackagePruductDTO product : products) {
-//            if (product.getIsDrug()==1){
-//                isDrug=true;
-//            }
-//        }
-//        Long prescribeId=null;
 
         Map<String,Object> packageJson = (Map)JSON.parse(packageOrder.getPackageJson());
         Integer packageSubType = (Integer)packageJson.get("packageSubType");
         if (packageSubType==3){
-            R orderByPackageOrderStatus4 = inquiryOrderService.createOrderByPackageOrderStatus4(packageOrder);
+            inquiryOrderService.createOrderByPackageOrderStatus4(packageOrder);
         }
         Long  prescribeId= fsPrescribeService.insertFsPrescribeByPackageOrder(packageOrder);
 
         FsStoreOrder order=new FsStoreOrder();
         List<FsStoreOrderItem> items=new ArrayList<>();
-        logger.info("套餐包生成药品订单:"+packageOrder.getOrderSn());
+        log.info("套餐包生成药品订单:{}",packageOrder.getOrderSn());
         order.setOrderCode(packageOrder.getOrderSn());
         order.setUserId(packageOrder.getUserId());
         order.setStoreId(fsPackage.getStoreId());
@@ -788,10 +774,6 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             }
         }
 
-
-
-
-
         order.setOrderType(fsPackage.getProductType());
         order.setTotalNum(totalNum);
         order.setTotalPrice(totalPrice);
@@ -832,7 +814,6 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                 fsFollow.setCompanyUserId(packageOrder.getCompanyUserId());
                 fsFollow.setDeptId(packageOrder.getDeptId());
                 fsFollow.setNum(1);
-//            fsFollow.setPackageOrderId(order.getOrderId());
                 fsFollow.setInquiryOrderId(packageOrder.getInquiryOrderId());
                 fsFollow.setPlanTime(DateUtils.getNowDate());
                 fsFollow.setPushStatus(1);
@@ -893,21 +874,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             try {
                 storeSubOrderService.insertFsStoreSubOrderByStoreOrder(order.getOrderId());
             }catch (Exception e){
-                logger.info("拆分订单错误:"+order.getOrderId());
-            }
-//            try {
-//                if (fsPackage.getProductType()==2){
-//                    fsStoreOrderService.tuiOrder(order.getOrderId());
-//                }else if (fsPackage.getProductType()==1){
-//                    fsStoreOrderService.createOmsOrder(order.getOrderId());
-//                }else {
-//
-//                }
-//
-//            } catch (ParseException e) {
-//                throw new RuntimeException(e);
-//            }
-//            tuiOrderUtil.TuiOrderByPackage(order);
+                log.info("拆分订单错误:{}",order.getOrderId());
+            }
         }
 
         return R.ok();
@@ -948,10 +916,6 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                     throw new CustomException("订单编号为空");
                 }
 
-//                if (vo.getDeliveryCode() == null || vo.getDeliveryCode().isEmpty()) {
-//                    throw new CustomException("快递公司编号为空");
-//                }
-
                 if (vo.getDeliveryName() == null || vo.getDeliveryName().isEmpty()) {
                     throw new CustomException("快递名称为空");
                 }
@@ -1033,10 +997,6 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
         }
     }
 
-
-
-
-
     @Override
     public int tuiOrder(Long orderId) {
 
@@ -1064,7 +1024,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
         FsStoreOrderItem item = new FsStoreOrderItem();
         item.setOrderId(o.getOrderId());
         List<FsStoreOrderItem> fsStoreOrderItems = fsStoreOrderItemMapper.selectFsStoreOrderItemList(item);
-        logger.info(""+fsStoreOrderItems);
+        log.info(""+fsStoreOrderItems);
         ArrayList<RecipeDetailParam> list = new ArrayList<>();
         Integer i=1;
         BigDecimal dprice = new BigDecimal(0);
@@ -1075,7 +1035,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             FsProdItemDTO fsProdItemDTO = JSON.parseObject(json, FsProdItemDTO.class);
             String barCode = fsProdItemDTO.getBarCode();
 
-            logger.info(""+fsProdItemDTO);
+            log.info(""+fsProdItemDTO);
             if(fsStoreOrderItem.getIsGift()!=null&&fsStoreOrderItem.getIsGift()==1){
                 continue;
             }
@@ -1141,11 +1101,6 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
         op.setAttention(remark);//医嘱
         op.setSymptoms(fp.getDiagnose());
         op.setRecipe_time(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(fp.getCreateTime()));
-//        op.setOperation_time("Jane");
-//        op.setOperation_time("2023-08-22 11:00:00");
-//        op.setPricing_id("pricing123");
-//        op.setPricing_cashier("Alice");
-//        op.setPricing_time("2023-08-22 12:00:00");
         op.setPrice(dprice.toString());
         op.setPrice_total(dprice.multiply(new BigDecimal(usage.getCounts())).toString());
         op.setRecipe_sale_price(o.getPayMoney().toString()); //实际收款
@@ -1159,10 +1114,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             op.setPatient_id(fp.getPatientId().toString());
         }
 
-        //op.setVisit_id("visit789");
-     //   op.setUsage_desc("备用字段描述");
         op.setAddress(o.getUserAddress());
-       // op.setRefund_name("");
         op.setRecipe_detail_list(list);
         ApiResponse order = hisApiService.createOrder(op);
         if (order.getState().equals("error")){
@@ -1175,8 +1127,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
 
         return 1;
     }
-    @Autowired
-    IFsPrescribeService fsPrescribeService;
+
     @Override
     public FsPrescribeVO selectFsPrescribeByPrescribeIdVO(Long prescribeId) {
         return  prescribeMapper.selectFsPrescribeByPrescribeIdVO(prescribeId);
@@ -1272,16 +1223,6 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                     storeOrder.setUserName(address.getRealName().trim());
                     storeOrder.setUserPhone(address.getPhone().trim());
                     storeOrder.setUserAddress(address.getProvince()+" "+address.getCity()+" "+address.getDistrict()+" "+address.getDetail());
-//                    String noAdd="南通市,镇江市,淮安市,江阴市,金华市,驻马店市";
-//                    String[] split = noAdd.split(",");
-//                    for (String s : split) {
-//                        if (s.equals(address.getCity())){
-//                            return R.error("此地区暂不支持配送");
-//                        }
-//                    }
-//                    if ("民权县".equals(address.getDistrict())){
-//                        return R.error("此地区暂不支持配送");
-//                    }
                 }
             }
             else{
@@ -1427,7 +1368,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
         return fsStoreOrderVOS;
     }
     @Override
-    @Transactional
+    @Transactional(rollbackFor = Throwable.class,propagation = Propagation.REQUIRED)
     public R payConfirm(String orderCode,String payCode, String tradeNo,String payType,Integer type) {
         try {
             FsStoreOrder order=null;
@@ -1436,17 +1377,17 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                 FsStorePayment storePayment = fsStorePaymentMapper.selectFsStorePaymentByPaymentCode(payCode);
                 if (storePayment!=null){
                     if(storePayment.getStatus().equals(0)){
-                        logger.info(payCode+"待支付");
+                        log.info(payCode+"待支付");
                         FsStorePayment paymentMap=new FsStorePayment();
                         paymentMap.setPaymentId(storePayment.getPaymentId());
                         paymentMap.setStatus(1);
                         paymentMap.setPayTime(new Date());
                         paymentMap.setTradeNo(tradeNo);
-                        if(payType.equals(PayType.微信小程序支付.getCode())){
-                            paymentMap.setPayTypeCode(PayType.微信小程序支付.name());
+                        if(payType.equals(PayType.WECHAT_MINI_PROGRAM_PAYMENT.getCode())){
+                            paymentMap.setPayTypeCode(PayType.WECHAT_MINI_PROGRAM_PAYMENT.name());
                         }
-                        else if(payType.equals(PayType.支付宝条码支付.getCode())){
-                            paymentMap.setPayTypeCode(PayType.支付宝条码支付.name());
+                        else if(payType.equals(PayType.ALIPAY_BARCODE_PAYMENT.getCode())){
+                            paymentMap.setPayTypeCode(PayType.ALIPAY_BARCODE_PAYMENT.name());
                         }
                         if (storePayment.getPayMode().equals("yb")){
                             OrderQueryDTO orderQueryDTO = new OrderQueryDTO();
@@ -1456,12 +1397,12 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                             paymentMap.setBankTransactionId(orderResult.getBankTrxId());
                         }
                         fsStorePaymentMapper.updateFsStorePayment(paymentMap);
-                        logger.info(payCode+"已支付");
+                        log.info(payCode+"已支付");
                         order=fsStoreOrderMapper.selectFsStoreOrderByOrderId(Long.parseLong(storePayment.getBusinessId()));
                     }
                 }
                 else{
-                    logger.info(payCode+"支付单号不存在");
+                    log.info(payCode+"支付单号不存在");
                     return R.error("支付单号不存在");
                 }
             }
@@ -1469,12 +1410,12 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                 order=fsStoreOrderMapper.selectFsStoreOrderByOrderCode(orderCode);
             }
             if(order!=null&&!order.getStatus().equals(FsStoreOrderStatusEnum.STATUS_1.getValue())){
-                logger.info(payCode+"订单号不为待支付回退");
+                log.info(payCode+"订单号不为待支付回退");
                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                 return R.error();
             }
             if(order!=null&&!order.getIsPay().equals(0)){
-                logger.info(payCode+"订单号支付不为待支付回退");
+                log.info(payCode+"订单号支付不为待支付回退");
                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                 return R.error();
             }
@@ -1517,7 +1458,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             }
             return R.ok();
         }catch (Exception e){
-            logger.info(payCode+"异常了"+e.getMessage());
+            log.info(payCode+"异常了"+e.getMessage());
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
             FsStorePaymentError err = new FsStorePaymentError();
             err.setOrderNo(orderCode);
@@ -1539,7 +1480,6 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
         FsStoreOrder order= fsStoreOrderMapper.selectFsStoreOrderByOrderCode(orderCode);
         if(order!=null&&order.getStatus()==2){
             FsExpress express=expressService.selectFsExpressByOmsCode(deliverCode);
-            log.info("订单id{},deliverCode:{},deliverName:{}", order.getOrderId(), deliverCode, deliverName);
             if(express!=null){
                 order.setDeliveryName(deliverName);
                 order.setDeliveryCode(express.getCode());
@@ -1574,7 +1514,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
     }
 
     @Override
-    @Transactional
+    @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)
     public int afterSales(FsStoreOrderSalesParam fsStoreOrderSalesParam) {
         FsStoreOrder order = fsStoreOrderMapper.selectFsStoreOrderByOrderId(fsStoreOrderSalesParam.getOrderId());
         if (order.getStatus()<0){
@@ -1639,8 +1579,6 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                 } else if(erpType == 3){
                     //瀚智
                     erpOrderService = hzOMSOrderService;
-                } else if(erpType == 4){
-                    erpOrderService = dfOrderService;
                 }
                 if(erpOrderService!= null && StringUtils.isNotEmpty(order.getExtendOrderId())){
                     if (!order.getExtendOrderId().equals("HIS")){
@@ -1716,11 +1654,6 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             erpOrder.setVip_code(order.getUserId().toString());
         }
         erpOrder.setPlatform_code(order.getOrderCode());
-//        if(order.getStoreHouseCode()==null){
-//            erpOrder.setWarehouse_code("CQDS001");
-//        }else{
-//            erpOrder.setWarehouse_code(order.getStoreHouseCode());
-//        }
 
         erpOrder.setShop_code(sysConfig.getErpShopCode());
         erpOrder.setSeller_memo(order.getRemark());
@@ -1887,46 +1820,27 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
         String s = fsPrescribeService.PrescribeImg(order.getPrescribeId());
         erpOrder.setSeller_memo(erpOrder.getSeller_memo()+"||"+s+"||");
         ErpOrderResponse response= erpOrderService.addOrder(erpOrder);
-        if (response == null){
-            logger.info("ErpCreate:"+order.getOrderCode()+":推送失败!!!!!");
-            return;
-        }
-        logger.info("ErpCreate:"+order.getOrderCode()+":"+JSONUtil.toJsonStr(response));
-        if(response.getSuccess()){
-
+        log.info("ErpCreate:"+order.getOrderCode()+":"+JSONUtil.toJsonStr(response));
+        if(Boolean.TRUE.equals(response.getSuccess())){
             //支付成功后 将订单号写入待发货的REDIS中
             redisCache.setCacheObject("delivery"+":"+response.getCode(),order.getOrderCode());
             //写入外部订单号
-            order.setExtendOrderId(response.getCode());
+            if (erpType == 2){
+                order.setExtendOrderId(order.getOrderCode());
+            } else {
+                order.setExtendOrderId(response.getCode());
+            }
             fsStoreOrderMapper.updateFsStoreOrder(order);
-        }else {
-//            if (response.getErrorDesc().equals("该订单已创建")){
-//                ErpOrderQueryRequert erpOrderQueryRequert = new ErpOrderQueryRequert();
-//                erpOrderQueryRequert.setPlatform_code(order.getOrderCode());
-//                ErpOrderQueryResponse erp = erpOrderService.getOrder(erpOrderQueryRequert);
-//                logger.info("ErpCreate:"+order.getOrderCode()+":"+JSONUtil.toJsonStr(response));
-//
-//                if (erp.getOrders()!=null&&erp.getOrders().size()>0){
-//                    ErpOrderQuery epr = erp.getOrders().get(0);
-//                    redisCache.setCacheObject("delivery"+":"+epr.getCode(),order.getOrderCode());
-//                    order.setExtendOrderId(epr.getCode());
-//                    fsStoreOrderMapper.updateFsStoreOrder(order);
-//                }
-//            }
         }
         //写入日志
 
-
     }
 
-
-
-
     @Override
     public ExpressResultDTO updateDeliveryItem(ExpressNotifyDTO notifyDTO) {
         String data= URLDecoder.decode(notifyDTO.getRequestData(), Charset.forName("UTF-8"));
         //ExpressInfoDTO
-        logger.info("快递根踪回调:"+data);
+        log.info("快递根踪回调: {}",data);
         FsSysConfig sysConfig = configUtil.getSysConfig();
         ExpressDataDTO expressDataDTO=JSONUtil.toBean(data,ExpressDataDTO.class);
         if(expressDataDTO!=null&&expressDataDTO.getData()!=null){
@@ -1934,8 +1848,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                 List<FsStoreOrder> orders=this.selectFsStoreOrderListByDeliveryId(dto.getLogisticCode());
                 if(orders!=null){
                     for(FsStoreOrder order:orders){
-                        logger.info("订单信息:"+JSONUtil.toJsonStr(order));
-                        logger.info("运单号:"+dto.getLogisticCode());
+                        log.info("订单信息: {}",JSONUtil.toJsonStr(order));
+                        log.info("运单号: {}",dto.getLogisticCode());
                         if(order!=null && (order.getDeliveryStatus()==null||order.getDeliveryStatus()!=3)){
                             if (dto.getState()!=null&&dto.getStateEx()!=null){
                                 FsStoreOrder map=new FsStoreOrder();
@@ -1950,7 +1864,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                                 }
                             }
                             if (!dto.isSuccess()){
-                                logger.info("物流状态异常:{}"+dto);
+                                log.info("物流状态异常:{}",dto);
                             }
                             if ((!dto.isSuccess()&&dto.getReason()!=null&&dto.getReason().equals("三天无轨迹"))||(!dto.isSuccess()&&dto.getReason()!=null&&dto.getReason().equals("七天内无轨迹变化"))){
                                 //订阅物流回调
@@ -1962,7 +1876,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                                     }
                                 }
                                 expressService.subscribeEspress(order.getOrderCode(),order.getDeliveryCode(),order.getDeliverySn(),lastFourNumber);
-                                logger.info("物流重新订阅:{}",order.getDeliverySn());
+                                log.info("物流重新订阅:{}",order.getDeliverySn());
                             }
 
                         }
@@ -1981,12 +1895,12 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
     }
 
     @Override
-    @Transactional
+    @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)
     public R syncExpress(Long id) {
+
         FsStoreOrder order = fsStoreOrderMapper.selectFsStoreOrderByOrderId(id);
         String lastFourNumber = "";
-        String deliverySn = order.getDeliverySn();
-        if (order.getDeliveryCode().equals(ShipperCodeEnum.SF.getValue()) || deliverySn.contains("SF")) {
+        if (order.getDeliveryCode().equals(ShipperCodeEnum.SF.getValue())) {
             lastFourNumber = order.getUserPhone();
             if (lastFourNumber.length() == 11) {
                 lastFourNumber = StrUtil.sub(lastFourNumber, lastFourNumber.length(), -4);
@@ -1995,7 +1909,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                 lastFourNumber = StrUtil.sub(jm, jm.length(), -4);
             }
         }
-        ExpressInfoDTO dto=expressService.getExpressInfo(order.getOrderCode(),order.getDeliveryCode(), deliverySn,lastFourNumber);
+        ExpressInfoDTO dto=expressService.getExpressInfo(order.getOrderCode(),order.getDeliveryCode(),order.getDeliverySn(),lastFourNumber);
         log.info("快递鸟查询dto:{}", JSONUtil.toJsonStr(dto));
         if (!dto.isSuccess()){
             return R.error(dto.getReason());
@@ -2008,7 +1922,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                     lastFourNumber = StrUtil.sub(lastFourNumber, lastFourNumber.length(), -4);
                 }
             }
-            dto=expressService.getExpressInfo(order.getOrderCode(),order.getDeliveryCode(), deliverySn,lastFourNumber);
+            dto=expressService.getExpressInfo(order.getOrderCode(),order.getDeliveryCode(),order.getDeliverySn(),lastFourNumber);
         }
 
         FsStoreOrder map=new FsStoreOrder();
@@ -2078,7 +1992,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
     }
 
     @Override
-    @Transactional
+    @Transactional(rollbackFor = Throwable.class,propagation = Propagation.REQUIRED)
     public R editTuiMoney(Long id) {
         FsStoreOrder order= fsStoreOrderMapper.selectFsStoreOrderByOrderId(id);
         if(order.getStatus()==4){
@@ -2151,8 +2065,6 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
 
         for (StoreOrderExpressExportDTO dto : list)
         {
-//            try
-//            {
                 FsStoreOrder order=fsStoreOrderMapper.selectFsStoreOrderListByDeliverySnLOne(dto.getDeliverySn());
                 if (StringUtils.isNull(order))
                 {
@@ -2188,13 +2100,6 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                     }
                 }
             }
-//            catch (Exception e)
-//            {
-//                String msg = "<br/>" + failureNum + "、快递单号 " + dto.getDeliverySn() + " 导入异常:";
-//                importErrorMsg.append(msg+e.getMessage());
-//                failureNum++;
-//            }
-//        }
         importMsg.insert(0, "导入完成!成功" + successNum + " 条,失败"+failureNum+"条。");
         importMsg.append(importErrorMsg.toString());
         importMsg.append(importSuccessMsg.toString());
@@ -2221,7 +2126,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
 
     @Override
     public synchronized  R finishOrder(Long orderId) {
-        return finishStoreOrder(orderId);
+        IFsStoreOrderService iFsStoreOrderService = (IFsStoreOrderService) AopContext.currentProxy();
+        return iFsStoreOrderService.finishStoreOrder(orderId);
     }
 
     @Override
@@ -2282,35 +2188,16 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
         }
     }
 
-    @Transactional
+    @Override
+    @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)
     public R finishStoreOrder(Long orderId){
         FsStoreOrder order= fsStoreOrderMapper.selectFsStoreOrderByOrderId(orderId);
-        if(order.getStatus()==FsStoreOrderStatusEnum.STATUS_3.getValue()){
+        if(Objects.equals(order.getStatus(), FsStoreOrderStatusEnum.STATUS_3.getValue())){
             order.setFinishTime(new Date());
             order.setStatus(4);
             fsStoreOrderMapper.updateFsStoreOrder(order);
             fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.FINISH_ORDER.getValue(),
                     FsStoreOrderLogEnum.FINISH_ORDER.getDesc());
-
-            if("1".equals(order.getPayType())){
-                FsErpFinishPush fsErpFinishPush = new FsErpFinishPush();
-                fsErpFinishPush.setOrderId(orderId);
-                fsErpFinishPush.setTaskStatus(0);
-                fsErpFinishPush.setRetryCount(0);
-                fsErpFinishPush.setCreateTime(new Date());
-                fsErpFinishPushMapper.insert(fsErpFinishPush);
-            }
-
-            //模板消息支付成功发布事件
-//            TemplateBean templateBean = TemplateBean.builder()
-//                    .orderId(order.getOrderId().toString())
-//                    .title(order.getOrderCode().toString())
-//                    .remark("您的订单已签收成功")
-//                    .time(order.getFinishTime())
-//                    .uid(order.getUserId())
-//                    .templateType(TemplateListenEnum.TYPE_3.getValue())
-//                    .build();
-//            publisher.publishEvent(new TemplateEvent(this, templateBean));
             return R.ok("操作成功");
         }
         else {
@@ -2335,7 +2222,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
     }
 
     @Override
-    @Transactional
+    @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)
     public void addIntegralAndShareByStoreOrder(FsStoreOrder fsStoreOrder) {
         fsUserService.addUserIntegral(fsStoreOrder.getPayMoney(),fsStoreOrder.getUserId(),fsStoreOrder.getOrderId(),2);
         FsStoreOrder order = new FsStoreOrder();
@@ -2386,10 +2273,10 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                             sharePayment.setShareMoney(new BigDecimal(r.getBody().getTrxAmt()));
                             fsStorePaymentMapper.updateFsStorePayment(sharePayment);
                         }else {
-                            logger.info("分账失败:"+fsStorePayment);
+                            log.error("分账失败: {}",fsStorePayment);
                         }
                     }else {
-                        logger.info("分账请求失败:"+fsStorePayment+r.getRetMsg());
+                        log.error("分账请求失败: {}",fsStorePayment+r.getRetMsg());
                     }
 
             }
@@ -2407,7 +2294,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             Long followDoctorId = fsStoreOrder.getFollowDoctorId();
             List<FsStoreOrder> orders = fsStoreOrderMapper.selectFsStoreOrderEndFollowByUserIdAndDocId(userId,followDoctorId);
 
-            if (orders==null||orders.size()==0){
+            if (CollectionUtils.isEmpty(orders)){
                 Long l = fsStoreOrderMapper.selectFsStoreOrderFollow(userId, followDoctorId);
                 MsgDTO msgDTO=new MsgDTO();
                 MsgCustomDTO customDTO=new MsgCustomDTO();
@@ -2425,10 +2312,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                 msgs1.add(msg1);
                 msgDTO.setMsgBody(msgs1);
                 MsgResponseDTO msgResponseDTO = imService.sendMsg(msgDTO);
-                logger.info("医生结束随访"+msgResponseDTO);
-
-
-
+                log.info("医生结束随访"+msgResponseDTO);
             }
             FsStoreOrder o = new FsStoreOrder();
             o.setOrderId(fsStoreOrder.getOrderId());
@@ -2461,8 +2345,9 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             }
         }
     }
-    @Transactional
+
     @Override
+    @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)
     public void endDeliveryOrder() {
         List<FsStoreOrder> fsStoreOrders = fsStoreOrderMapper.selectEndDeliveryOrder();
         for (FsStoreOrder fsStoreOrder : fsStoreOrders) {
@@ -2494,7 +2379,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
     }
 
     @Override
-    @Transactional
+    @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED)
     public R returnCost(Long orderId) {
         FsStoreOrder order = fsStoreOrderMapper.selectFsStoreOrderByOrderId(orderId);
         if (order!=null){
@@ -2517,7 +2402,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                                     continue;
                                 }
                                 BigDecimal money = logs.getMoney().multiply(new BigDecimal(-1));
-                                logger.info("退款佣金扣除:"+company.getCompanyId()+":"+money);
+                                log.info("退款佣金扣除:"+company.getCompanyId()+":"+money);
                                 company.setMoney(company.getMoney().subtract(logs.getMoney()));
                                 companyMapper.updateCompany(company);
                                 CompanyMoneyLogs log=new CompanyMoneyLogs();
@@ -2534,7 +2419,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                         if (!doesNotContain6){
                             if(logs.getLogsType()==5){
                                 BigDecimal money = logs.getMoney().multiply(new BigDecimal(-1));
-                                logger.info("退款成本返还:"+company.getCompanyId()+":"+money);
+                                log.info("退款成本返还:"+company.getCompanyId()+":"+money);
                                 company.setMoney(company.getMoney().add(money));
                                 companyMapper.updateCompany(company);
                                 CompanyMoneyLogs log=new CompanyMoneyLogs();
@@ -2658,7 +2543,6 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
 
             if(order.getPayMoney().compareTo(new BigDecimal(0))==0){
                 this.payConfirm(order.getOrderCode(),"","","",2);
-                // tuiOrderUtil.TuiOrder(order.getOrderId());
                 return R.ok().put("data",param.getOrderId()).put("isPay","1");
             }
             else {
@@ -2791,7 +2675,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
         if(order==null){
             return R.error("订单不存在");
         }
-        if(order.getStatus()!= FsStoreOrderStatusEnum.STATUS_1.getValue()){
+        if(!Objects.equals(order.getStatus(), FsStoreOrderStatusEnum.STATUS_1.getValue())){
             return R.error("订单状态不正确");
         }
 
@@ -2799,7 +2683,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
         if(user!=null&& StringUtils.isNotEmpty(user.getMaOpenId())){
 
             if(order.getPayMoney().compareTo(new BigDecimal(0))==0){
-                this.payConfirm(order.getOrderCode(),"","","",2);
+                IFsStoreOrderService fsStoreOrderService1 = (IFsStoreOrderService) AopContext.currentProxy();
+                fsStoreOrderService1.payConfirm(order.getOrderCode(),"","","",2);
                 return R.ok().put("data",param.getOrderId()).put("isPay","1");
             }
             else {
@@ -2842,7 +2727,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
                         o.setGoodsInfo("药品订单支付"); // 订单信息
                         o.setOrderType(2);
                         o.setOrderId(order.getOrderId().toString());
-                        o.setPayType(Arrays.asList(PayType.支付宝条码支付.getCode()));
+                        o.setPayType(Arrays.asList(PayType.ALIPAY_BARCODE_PAYMENT.getCode()));
                         TzBankResult<PayCreateOrderResult> result = tzBankService.createOrder(o);
                         FsStorePayment mt=new FsStorePayment();
                         mt.setPaymentId(storePayment.getPaymentId());
@@ -2952,12 +2837,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             erpOrder.setVip_code(order.getUserId().toString());
         }
         erpOrder.setPlatform_code(order.getOrderCode());
+
         erpOrder.setWarehouse_code(configUtil.getSysConfig().getErpWarehouseCode());
-//        }
-//        if(order.getStoreHouseCode().equals("YDSP001")){
-//            erpOrder.setShop_code("RunDayWuHan");
-//        }
-//        else{
         //判断是否开启erp
         FsSysConfig sysConfig = configUtil.getSysConfig();
         Integer erpOpen = sysConfig.getErpOpen();
@@ -2975,15 +2856,11 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             }
         }
 
-//        }
-//      erpOrder.setPost_fee(order.getTotalPostage().doubleValue());
         erpOrder.setSeller_memo(order.getRemark());
-        // order.setCurrency_code("JCZD");
         List<ErpOrderPayment> payments=new ArrayList<>();
         ErpOrderPayment payment=new ErpOrderPayment();
         payment.setPay_type_code("weixin");
         payment.setPayment(order.getPayMoney().doubleValue());
-        //payment.setPaytime(new Timestamp(System.currentTimeMillis()));
         if(order.getPayTime()!=null){
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
             String timeString = sdf.format(order.getPayTime());
@@ -3025,6 +2902,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
         }
 
         if("WHSP001".equals(order.getStoreHouseCode())){
+            //武汉不备注快递史
         }
         else{
             erpOrder.setSeller_memo(erpOrder.getSeller_memo()+"-"+ order.getDeliveryName());

+ 22 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsUserOperationLogServiceImpl.java

@@ -3,13 +3,18 @@ package com.fs.his.service.impl;
 import java.util.ArrayList;
 import java.util.List;
 
+import cn.hutool.core.util.ObjectUtil;
 import com.alibaba.fastjson.JSON;
 import com.fs.common.utils.DateUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fs.common.utils.StringUtils;
+import com.fs.course.domain.FsCourseRedPacketLog;
+import com.fs.course.mapper.FsCourseRedPacketLogMapper;
 import com.fs.course.vo.FsUserCourseVO;
 import com.fs.his.param.FsUserOperationLogQueryParam;
 import com.fs.his.vo.FsUserOperationLogPageVo;
+import com.fs.his.vo.FsUserOperationLogParamVo;
+import com.fs.his.vo.FsUserOperationLogVo;
 import com.github.pagehelper.PageInfo;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -26,6 +31,8 @@ import com.fs.his.service.IFsUserOperationLogService;
  */
 @Service
 public class FsUserOperationLogServiceImpl extends ServiceImpl<FsUserOperationLogMapper, FsUserOperationLog> implements IFsUserOperationLogService {
+    @Autowired
+    private FsCourseRedPacketLogMapper fsCourseRedPacketLogMapper;
 
     /**
      * 查询用户操作日志
@@ -137,4 +144,19 @@ public class FsUserOperationLogServiceImpl extends ServiceImpl<FsUserOperationLo
     {
         return baseMapper.deleteFsUserOperationLogByLogId(logId);
     }
+
+    @Override
+    public List<FsUserOperationLogVo> selectFsUserOperationLogByList(FsUserOperationLog fsUserOperationLog) {
+        List<FsUserOperationLogVo> list = baseMapper.selectFsUserOperationLogByList(fsUserOperationLog);
+        list.forEach(e->{
+            FsUserOperationLogParamVo fsUserOperationLogParamVo = JSON.parseObject(e.getParam(), FsUserOperationLogParamVo.class);
+            e.setParamVo(fsUserOperationLogParamVo);
+            if (ObjectUtil.isEmpty(fsUserOperationLogParamVo)){
+                return;
+            }
+            FsCourseRedPacketLog fsCourseRedPacketLog = fsCourseRedPacketLogMapper.selectFsCourseRedPacketLogByTemporary(fsUserOperationLogParamVo.getVideoId(),e.getUserId());
+            e.setFsCourseRedPacketLog(fsCourseRedPacketLog);
+        });
+        return list;
+    }
 }

+ 21 - 22
fs-service/src/main/java/com/fs/tzBankPay/doman/PayType.java

@@ -1,27 +1,27 @@
 package com.fs.tzBankPay.doman;
 
 public enum PayType {
-    账户支付("01"),
-    B2C网关("02"),
-    B2B网关("03"),
-    快捷支付("04"),
-    企业白条支付("06"),
-    e购贷支付("08"),
-    数字人民币支付("09"),
-    微信小程序支付("14"),
-    微信公众号("15"),
-    微信二维码支付("16"),
-    支付宝条码支付("27"),
-    云闪付("44"),
-    台行及村镇卡支付("45"),
-    B2B网银("46"),
-    B2C网银("47"),
-    钱包支付("48"),
-    台行及村镇企业账户支付("49"),
-    供应链白条支付("51"),
-    银联支付("53"),
-    银联签约支付("55"),
-    代付("99");
+    ACCOUNT_PAYMENT("01"),
+    B2C_GATEWAY("02"),
+    B2B_GATEWAY("03"),
+    QUICK_PAYMENT("04"),
+    ENTERPRISE_CREDIT_PAYMENT("06"),
+    E_PURCHASE_LOAN_PAYMENT("08"),
+    DIGITAL_RMB_PAYMENT("09"),
+    WECHAT_MINI_PROGRAM_PAYMENT("14"),
+    WECHAT_PUBLIC_ACCOUNT("15"),
+    WECHAT_QR_CODE_PAYMENT("16"),
+    ALIPAY_BARCODE_PAYMENT("27"),
+    CLOUD_QUICK_PASS("44"),
+    TAIWAN_AND_VILLAGE_BANK_CARD_PAYMENT("45"),
+    B2B_ONLINE_BANKING("46"),
+    B2C_ONLINE_BANKING("47"),
+    WALLET_PAYMENT("48"),
+    TAIWAN_AND_VILLAGE_ENTERPRISE_ACCOUNT_PAYMENT("49"),
+    SUPPLY_CHAIN_CREDIT_PAYMENT("51"),
+    UNIONPAY_PAYMENT("53"),
+    UNIONPAY_CONTRACT_PAYMENT("55"),
+    PAYMENT_ON_BEHALF("99");
 
     private final String code;
 
@@ -33,4 +33,3 @@ public enum PayType {
         return code;
     }
 }
-

+ 10 - 15
fs-service/src/main/resources/application-config-druid-jnmy.yml

@@ -10,14 +10,9 @@ logging:
 wx:
   miniapp:
     configs:
-      - appid: wx4115995705bb0ea0   #中康智慧
-        secret: 58910ae743005c396012b029c7def579
-        token: Ncbnd7lJvkripVOpyTFAna6NAWCxCrvC
-        aesKey: HlEiBB55eaWUaeBVAQO3cWKWPYv1vOVQSq7nFNICw4E
-        msgDataFormat: JSON
-      - appid: wxedde588767b358b1   #中康未来智慧药房
-        secret: 928d2961c81610d8f64b019597212fcd
-        token: Ncbnd7lJvkripVOpyTFAna6NAWCxCrvC
+      - appid:
+        secret:
+        token:
         aesKey: HlEiBB55eaWUaeBVAQO3cWKWPYv1vOVQSq7nFNICw4E
         msgDataFormat: JSON
   cp:
@@ -42,10 +37,10 @@ wx:
       port: 6379
       timeout: 2000
     configs:
-      - appId: wx5d3096e20e4bd8ba # 第一个公众号的appid  //公众号名称:成都九州在线互联网医院
-        secret: 1afa05f0c71beff0d52fb849c62e479a # 公众号的appsecret
-        token: PPKOdAlCoMO # 接口配置里的Token值
-        aesKey: Eswa6VjwtVMCcw03qZy6fWllgrv5aytIA1SZPEU0kU2 # 接口配置里的EncodingAESKey值
+      - appId:  # 第一个公众号的appid
+        secret:  # 公众号的appsecret
+        token:  # 接口配置里的Token值
+        aesKey:  # 接口配置里的EncodingAESKey值
 aifabu:  #爱链接
   appKey: 7b471be905ab17e00f3b858c6710dd117601d008
 watch:
@@ -75,9 +70,9 @@ tencent_cloud_config:
   region: ap-chongqing
   proxy: jnmy
 tmp_secret_config:
-  secret_id: AKIDCj7NSNAovtqeJpBau8GZ4CGB71thXIxX
-  secret_key: lTB5zwqqz7CNhzDOWivFWedgfTBgxgBT
-  bucket: fs-1319721001
+  secret_id: AKIDCj7NSNAovtqeJpBau8GZ4CGB71thXIx
+  secret_key: lTB5zwqqz7CNhzDOWivFWedgfTBgxgB
+  bucket: fs-131972100
   app_id: 1319721001
   region: ap-chongqing
   proxy: fs

+ 11 - 0
fs-service/src/main/resources/mapper/his/FsUserOperationLogMapper.xml

@@ -27,6 +27,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         order by create_time desc
     </select>
 
+    <select id="selectFsUserOperationLogByList" parameterType="FsUserOperationLog" resultType="com.fs.his.vo.FsUserOperationLogVo">
+        <include refid="selectFsUserOperationLogVo"/>
+        <where>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="operationType != null  and operationType != ''"> and operation_type = #{operationType}</if>
+            <if test="details != null  and details != ''"> and details = #{details}</if>
+        </where>
+        order by create_time desc
+    </select>
+
+
     <select id="selectFsUserOperationLogByLogId" parameterType="Long" resultMap="FsUserOperationLogResult">
         <include refid="selectFsUserOperationLogVo"/>
         where log_id = #{logId}