瀏覽代碼

Merge branch 'refs/heads/master' into openIm

caoliqin 1 周之前
父節點
當前提交
733feea834
共有 40 個文件被更改,包括 527 次插入125 次删除
  1. 6 0
      fs-admin/src/main/java/com/fs/course/controller/FsCoursePlaySourceConfigController.java
  2. 2 0
      fs-admin/src/main/java/com/fs/his/controller/FsPackageOrderController.java
  3. 4 2
      fs-admin/src/main/java/com/fs/his/controller/FsStoreOrderController.java
  4. 7 6
      fs-common/src/main/java/com/fs/common/utils/CloudHostUtils.java
  5. 13 0
      fs-company-app/src/main/java/com/fs/app/exception/FSExceptionHandler.java
  6. 1 1
      fs-company/src/main/java/com/fs/company/controller/company/CompanyUserController.java
  7. 4 2
      fs-company/src/main/java/com/fs/company/controller/store/FsStoreOrderController.java
  8. 2 0
      fs-service/src/main/java/com/fs/company/mapper/CompanyDeptMapper.java
  9. 6 1
      fs-service/src/main/java/com/fs/company/service/impl/CompanyServiceImpl.java
  10. 3 0
      fs-service/src/main/java/com/fs/company/vo/CompanyUserQwListVO.java
  11. 1 0
      fs-service/src/main/java/com/fs/course/mapper/FsUserCourseVideoRedPackageMapper.java
  12. 1 1
      fs-service/src/main/java/com/fs/course/service/impl/FsUserCoursePeriodDaysServiceImpl.java
  13. 3 5
      fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java
  14. 67 57
      fs-service/src/main/java/com/fs/course/service/impl/FsUserWatchStatisticsServiceImpl.java
  15. 14 1
      fs-service/src/main/java/com/fs/erp/service/impl/DfOrderServiceImpl.java
  16. 6 1
      fs-service/src/main/java/com/fs/his/enums/FsStoreOrderLogEnum.java
  17. 1 0
      fs-service/src/main/java/com/fs/his/mapper/FsStorePaymentMapper.java
  18. 2 2
      fs-service/src/main/java/com/fs/his/service/IFsStoreOrderService.java
  19. 12 9
      fs-service/src/main/java/com/fs/his/service/impl/FsPackageOrderServiceImpl.java
  20. 15 0
      fs-service/src/main/java/com/fs/his/service/impl/FsStoreAfterSalesServiceImpl.java
  21. 13 9
      fs-service/src/main/java/com/fs/his/service/impl/FsStoreOrderServiceImpl.java
  22. 3 0
      fs-service/src/main/java/com/fs/his/vo/FsPackageOrderExcelVO.java
  23. 71 0
      fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductScrm.java
  24. 2 1
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java
  25. 122 0
      fs-service/src/main/java/com/fs/hisStore/param/FsStoreProductAddEditParam.java
  26. 17 0
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreAfterSalesScrmServiceImpl.java
  27. 2 0
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductScrmServiceImpl.java
  28. 5 0
      fs-service/src/main/java/com/fs/hisStore/vo/FsStoreProductListVO.java
  29. 1 1
      fs-service/src/main/resources/application-config-druid-hzyy.yml
  30. 12 6
      fs-service/src/main/resources/mapper/company/CompanyDeptMapper.xml
  31. 6 1
      fs-service/src/main/resources/mapper/course/FsUserCourseVideoRedPackageMapper.xml
  32. 7 6
      fs-service/src/main/resources/mapper/his/FsMaterialMapper.xml
  33. 3 0
      fs-service/src/main/resources/mapper/his/FsStorePaymentMapper.xml
  34. 8 1
      fs-service/src/main/resources/mapper/his/FsUserMapper.xml
  35. 78 2
      fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml
  36. 2 2
      fs-store/src/main/java/com/fs/store/controller/store/FsStoreOrderController.java
  37. 1 1
      fs-user-app/src/main/java/com/fs/app/controller/AdvController.java
  38. 0 2
      fs-user-app/src/main/java/com/fs/app/controller/CommonController.java
  39. 2 2
      fs-user-app/src/main/java/com/fs/app/controller/CourseController.java
  40. 2 3
      fs-user-app/src/main/java/com/fs/app/controller/InquiryOrderController.java

+ 6 - 0
fs-admin/src/main/java/com/fs/course/controller/FsCoursePlaySourceConfigController.java

@@ -2,10 +2,12 @@ package com.fs.course.controller;
 
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
 import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.enums.BusinessType;
 import com.fs.common.utils.bean.BeanUtils;
@@ -112,4 +114,8 @@ public class FsCoursePlaySourceConfigController extends BaseController {
         fsCoursePlaySourceConfigService.update(updateWrapper);
         return AjaxResult.success();
     }
+    @GetMapping("/listAll")
+    public R listAll() {
+        return R.ok().put("data", fsCoursePlaySourceConfigService.list(new QueryWrapper<FsCoursePlaySourceConfig>().eq("is_del", 0)));
+    }
 }

+ 2 - 0
fs-admin/src/main/java/com/fs/his/controller/FsPackageOrderController.java

@@ -77,6 +77,7 @@ public class FsPackageOrderController extends BaseController
     @GetMapping("/export")
     public AjaxResult export(FsPackageOrderParam  fsPackageOrder)
     {
+        Integer status = fsPackageOrder.getStatus();
         Integer exportType1 = exportTaskService.isExportType1(SecurityUtils.getUserId());
         if (exportType1>0){
             return AjaxResult.error("你已经有正在导出的任务");
@@ -85,6 +86,7 @@ public class FsPackageOrderController extends BaseController
         if (fsPackageOrderService.isEntityNull(fsPackageOrder)){
             return AjaxResult.error("请筛选数据导出");
         }
+        fsPackageOrder.setStatus(status); //解决isEntityNull方法后status缺失
         Long count = fsPackageOrderService.selectFsPackageOrderExcelListVOCount(fsPackageOrder);
         if (count>30000){
             return AjaxResult.error("导出数据不可超过3w条");

+ 4 - 2
fs-admin/src/main/java/com/fs/his/controller/FsStoreOrderController.java

@@ -528,7 +528,8 @@ public class FsStoreOrderController extends BaseController
     @PutMapping("/sendGoods")
     public AjaxResult sendGoods(@RequestBody FsStoreOrder fsStoreOrder)
     {
-        return toAjax(fsStoreOrderService.sendGoods(fsStoreOrder));
+        String nickName = getLoginUser().getUser().getNickName();
+        return toAjax(fsStoreOrderService.sendGoods(fsStoreOrder,nickName));
     }
     /**
      * 推送到智慧药房
@@ -560,7 +561,8 @@ public class FsStoreOrderController extends BaseController
     public AjaxResult getGoods(@RequestBody FsStoreOrder fsStoreOrder)
     {
         logger.info("总后台手动确认收货:"+fsStoreOrder.getOrderId());
-        return toAjax(fsStoreOrderService.getGoods(fsStoreOrder.getOrderId()));
+        String nickName = getLoginUser().getUser().getNickName();
+        return toAjax(fsStoreOrderService.getGoods(fsStoreOrder.getOrderId(),nickName));
     }
 
     /**

+ 7 - 6
fs-common/src/main/java/com/fs/common/utils/CloudHostUtils.java

@@ -3,21 +3,22 @@ package com.fs.common.utils;
 
 import com.fs.common.utils.spring.SpringUtils;
 
+import java.util.Arrays;
+
 public class CloudHostUtils {
 
     /**
      * 是否指定项目名称配置
      */
-    public static boolean isCloudHostName(String cloudHostName) {
+    public static boolean hasCloudHostName(String... cloudHostName) {
         String cloudHostNameConfig = SpringUtils.getProperty("cloud_host.company_name");
         if (StringUtils.isBlank(cloudHostNameConfig)) {
             return false;
         }
 
-        if (StringUtils.isBlank(cloudHostName)) {
-            return false;
-        }
-
-        return cloudHostNameConfig.equalsIgnoreCase(cloudHostName);
+        return Arrays.stream(cloudHostName)
+                .filter(StringUtils::isNotBlank)
+                .map(String::trim)
+                .anyMatch(name -> cloudHostNameConfig.equalsIgnoreCase(name.trim()));
     }
 }

+ 13 - 0
fs-company-app/src/main/java/com/fs/app/exception/FSExceptionHandler.java

@@ -5,6 +5,7 @@ package com.fs.app.exception;
 
 import com.fs.common.core.domain.R;
 import com.fs.common.exception.CustomException;
+import com.fs.common.exception.ServiceException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.dao.DuplicateKeyException;
@@ -36,6 +37,18 @@ public class FSExceptionHandler {
 		return r;
 	}
 
+	/**
+	 * 处理自定义异常
+	 */
+	@ExceptionHandler(ServiceException.class)
+	public R handleRRException(ServiceException e){
+		R r = new R();
+		r.put("code", e.getCode());
+		r.put("msg", e.getMessage());
+
+		return r;
+	}
+
 	@ExceptionHandler(NoHandlerFoundException.class)
 	public R handlerNoFoundException(Exception e) {
 		logger.error(e.getMessage(), e);

+ 1 - 1
fs-company/src/main/java/com/fs/company/controller/company/CompanyUserController.java

@@ -157,7 +157,7 @@ public class CompanyUserController extends BaseController
     @Log(title = "销售信息导入", businessType = BusinessType.IMPORT,isStoreLog = true,logParam = {"销售","信息导入"})
     @PreAuthorize("@ss.hasPermi('company:user:import')")
     @PostMapping("/importCompanyUser")
-    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
+    public AjaxResult importData(@RequestParam("file") MultipartFile file, boolean updateSupport) throws Exception
     {
         ExcelUtil<CompanyUserImportVO> util = new ExcelUtil<>(CompanyUserImportVO.class);
         List<CompanyUserImportVO> list = util.importExcel(file.getInputStream());

+ 4 - 2
fs-company/src/main/java/com/fs/company/controller/store/FsStoreOrderController.java

@@ -347,7 +347,8 @@ public class FsStoreOrderController extends BaseController
     @PutMapping("/sendGoods")
     public AjaxResult sendGoods(@RequestBody FsStoreOrder fsStoreOrder)
     {
-        return toAjax(fsStoreOrderService.sendGoods(fsStoreOrder));
+        String nickName = getLoginUser().getUser().getNickName();
+        return toAjax(fsStoreOrderService.sendGoods(fsStoreOrder,nickName));
     }
 
     @PutMapping("/bindCustomer")
@@ -401,7 +402,8 @@ public class FsStoreOrderController extends BaseController
     @RepeatSubmit
     public AjaxResult getGoods(@RequestBody FsStoreOrder fsStoreOrder)
     {
-        return toAjax(fsStoreOrderService.getGoods(fsStoreOrder.getOrderId()));
+        String nickName = getLoginUser().getUser().getNickName();
+        return toAjax(fsStoreOrderService.getGoods(fsStoreOrder.getOrderId(),nickName));
     }
 
     /**

+ 2 - 0
fs-service/src/main/java/com/fs/company/mapper/CompanyDeptMapper.java

@@ -116,4 +116,6 @@ public interface CompanyDeptMapper
 
     @Select("select dept_id,dept_name from company_dept where dept_name=#{deptName} limit 1")
     CompanyDept selectDeptNameBydeptName(@Param("deptName") String deptName);
+
+    void deleteCompanyDeptByCompanyIds(Long[] companyIds);
 }

+ 6 - 1
fs-service/src/main/java/com/fs/company/service/impl/CompanyServiceImpl.java

@@ -295,7 +295,12 @@ public class CompanyServiceImpl implements ICompanyService
     @Override
     public int deleteCompanyByIds(Long[] companyIds)
     {
-        return companyMapper.deleteCompanyByIds(companyIds);
+        int i = companyMapper.deleteCompanyByIds(companyIds);
+        //删除对应部门
+        if (i > 0){
+            companyDeptMapper.deleteCompanyDeptByCompanyIds(companyIds);
+        }
+        return i;
     }
 
     /**

+ 3 - 0
fs-service/src/main/java/com/fs/company/vo/CompanyUserQwListVO.java

@@ -128,4 +128,7 @@ public class CompanyUserQwListVO extends BaseEntity {
     /** 是否允许所有方式注册会员,1-是,0-否,默认1(用于个微注册会员) */
     private Integer isAllowedAllRegister;
 
+    /** 医生id */
+    private Long doctorId;
+
 }

+ 1 - 0
fs-service/src/main/java/com/fs/course/mapper/FsUserCourseVideoRedPackageMapper.java

@@ -66,6 +66,7 @@ public interface FsUserCourseVideoRedPackageMapper
      * @return 结果
      */
     public int deleteFsUserCourseVideoRedPackageByIds(Long[] ids);
+    public int deleteFsUserCourseVideoRedPackageByVedioIds(Long[] ids);
     @Update("INSERT INTO fs_user_course_video_red_package (company_id, video_id, red_packet_money) " +
             "VALUES (#{companyId}, #{videoId}, #{redPacketMoney}) " +
             "ON DUPLICATE KEY UPDATE red_packet_money = VALUES(red_packet_money);")

+ 1 - 1
fs-service/src/main/java/com/fs/course/service/impl/FsUserCoursePeriodDaysServiceImpl.java

@@ -133,7 +133,7 @@ public class FsUserCoursePeriodDaysServiceImpl extends ServiceImpl<FsUserCourseP
         if(!periodDayIds.isEmpty()){
             flag = fsUserCoursePeriodDaysMapper.updateBatchDelFlag(periodDayIds.toArray(new Long[0]),1);
             //删除红包记录
-            fsUserCourseVideoRedPackageMapper.updateBatchDelFlag(videoIds.toArray(new Long[0]),1);
+            fsUserCourseVideoRedPackageMapper.deleteFsUserCourseVideoRedPackageByVedioIds(videoIds.toArray(new Long[0]));
         }
         return flag;
     }

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

@@ -4,7 +4,6 @@ import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
-import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.fs.common.BeanCopyUtils;
 import com.fs.common.core.domain.R;
@@ -13,11 +12,11 @@ import com.fs.common.core.domain.entity.SysDictData;
 import com.fs.common.core.redis.RedisCache;
 import com.fs.common.enums.BizResponseEnum;
 import com.fs.common.exception.CustomException;
+import com.fs.common.utils.CloudHostUtils;
 import com.fs.common.utils.DateUtils;
 import com.fs.common.utils.StringUtils;
 import com.fs.common.utils.date.DateUtil;
 import com.fs.company.domain.Company;
-import com.fs.company.domain.CompanyMoneyLogs;
 import com.fs.company.domain.CompanyUser;
 import com.fs.company.mapper.CompanyMapper;
 import com.fs.company.mapper.CompanyMoneyLogsMapper;
@@ -74,7 +73,6 @@ import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
@@ -1221,7 +1219,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
                 if (fsUserWx ==null){
                     if (user.getCourseMaOpenId()==null){
                         logger.error("zyp \n 【转账openId参数错误】:{}", user.getUserId());
-                        return R.error("openId参数错误");
+                        return R.error("openId参数错误,请清理缓存后重新授权!");
                     }
                     packetParam.setOpenId(user.getCourseMaOpenId());
                     try {
@@ -1639,7 +1637,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             return ResponseResult.fail(504, "请观看最新的课程项目");
         }
         // 项目看课数限制
-        if(!"福本源".equals(signProjectName) && !"宽益堂".equals(signProjectName)) {
+        if(!"福本源".equals(signProjectName) && !"宽益堂".equals(signProjectName) && !CloudHostUtils.hasCloudHostName("弘德堂")) {
             Integer logCount = fsUserCourseMapper.selectTodayCourseWatchLogCountByUserIdAndProjectId(param.getUserId(), courseProject);
             if (Objects.isNull(watchCourseVideo) && logCount > 0) {
                 return ResponseResult.fail(504, "超过项目看课数量限制");

+ 67 - 57
fs-service/src/main/java/com/fs/course/service/impl/FsUserWatchStatisticsServiceImpl.java

@@ -140,63 +140,73 @@ public class FsUserWatchStatisticsServiceImpl extends ServiceImpl<FsUserWatchSta
 
         //获取公司的会员数量和今日新增会员数量
         List<FsUserWatchStatistics> userTotal = fsUserMapper.selectFsUserTotal();
-        Map<String, FsUserWatchStatistics> userTotalMap = userTotal.stream().collect(Collectors.toMap(FsUserWatchStatistics::getCompanyId, Function.identity()));
-
-        List<FsUserWatchStatistics> list = fsUserCoursePeriods.stream()
-                .flatMap(item -> Arrays.stream(item.getCompanyId().split(","))
-                        .map(companyIdStr -> {
-                            Long companyId = Long.valueOf(companyIdStr.trim());
-                            Company company = companyMap.get(companyId);
-
-                            // 赋值
-                            FsUserWatchStatistics fsUserWatchStatistics = new FsUserWatchStatistics();
-                            BeanUtils.copyProperties(item, fsUserWatchStatistics);
-                            ZonedDateTime zonedDateTime = item.getPeriodStartingTime().atStartOfDay(ZoneId.systemDefault());
-                            // 改成使用营期线来表示营期开始时间
-                            fsUserWatchStatistics.setPeriodStartingTime(item.getPeriodLine() != null ? item.getPeriodLine() : Date.from(zonedDateTime.toInstant()));
-                            fsUserWatchStatistics.setCompanyId(companyIdStr.trim());
-                            fsUserWatchStatistics.setCompanyName(company != null ? company.getCompanyName() : null);
-
-                            FsUserWatchStatistics userTotalData = userTotalMap.get(fsUserWatchStatistics.getCompanyId());
-
-                            String key = String.format("%s-%s", fsUserWatchStatistics.getPeriodId(), fsUserWatchStatistics.getCompanyId());
-                            FsUserWatchStatistics watchData = courseWatchStatisticsMap.get(key);
-
-                            if(userTotalData != null){
-                                fsUserWatchStatistics.setUserNum(userTotalData.getUserNum());
-                                fsUserWatchStatistics.setNewUserNum(userTotalData.getNewUserNum());
-                            } else {
-                                fsUserWatchStatistics.setUserNum(0);
-                                fsUserWatchStatistics.setNewUserNum(0);
-                            }
-
-                            if(watchData != null){
-                                fsUserWatchStatistics.setWatchNum(watchData.getWatchNum());
-                                fsUserWatchStatistics.setCompleteWatchNum(watchData.getCompleteWatchNum());
-                                fsUserWatchStatistics.setCompleteWatchRate(watchData.getCompleteWatchRate());
-                            } else {
-                                fsUserWatchStatistics.setWatchNum(0);
-                                fsUserWatchStatistics.setCompleteWatchNum(0);
-                                fsUserWatchStatistics.setCompleteWatchRate(BigDecimal.ZERO);
-                            }
-
-                            // 计算上线率
-                            BigDecimal watchNum = new BigDecimal(fsUserWatchStatistics.getWatchNum());
-                            BigDecimal userNum = new BigDecimal(fsUserWatchStatistics.getUserNum());
-                            if(!userNum.equals(BigDecimal.ZERO)){
-                                BigDecimal onlineRate = watchNum.divide(userNum, 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
-                                fsUserWatchStatistics.setOnlineRate(onlineRate);
-                            } else {
-                                fsUserWatchStatistics.setOnlineRate(BigDecimal.ZERO);
-                            }
-
-                            fsUserWatchStatistics.setCreateTime(new Date());
-                            fsUserWatchStatistics.setUpdateTime(new Date());
-                            return fsUserWatchStatistics;
-                        })).collect(Collectors.toList());
-
-        //2、分批次插入数据
-        this.batchInsert(list);
+        Map<String, FsUserWatchStatistics> userTotalMap;
+        if (userTotal != null && userTotal.size() > 0) {
+            userTotalMap = userTotal.stream().collect(Collectors.toMap(FsUserWatchStatistics::getCompanyId, Function.identity()));
+
+        } else {
+            userTotalMap = null;
+        }
+        if (!fsUserCoursePeriods.isEmpty()) {
+            List<FsUserWatchStatistics> list = fsUserCoursePeriods.stream()
+                    .flatMap(item -> Arrays.stream(item.getCompanyId().split(","))
+                            .map(companyIdStr -> {
+                                Long companyId = Long.valueOf(companyIdStr.trim());
+                                Company company = companyMap.get(companyId);
+
+                                // 赋值
+                                FsUserWatchStatistics fsUserWatchStatistics = new FsUserWatchStatistics();
+                                BeanUtils.copyProperties(item, fsUserWatchStatistics);
+                                ZonedDateTime zonedDateTime = item.getPeriodStartingTime().atStartOfDay(ZoneId.systemDefault());
+                                // 改成使用营期线来表示营期开始时间
+                                fsUserWatchStatistics.setPeriodStartingTime(item.getPeriodLine() != null ? item.getPeriodLine() : Date.from(zonedDateTime.toInstant()));
+                                fsUserWatchStatistics.setCompanyId(companyIdStr.trim());
+                                fsUserWatchStatistics.setCompanyName(company != null ? company.getCompanyName() : null);
+                                if (Objects.nonNull(userTotalMap)){
+                                    FsUserWatchStatistics userTotalData = userTotalMap.get(fsUserWatchStatistics.getCompanyId());
+                                    if(userTotalData != null){
+                                        fsUserWatchStatistics.setUserNum(userTotalData.getUserNum());
+                                        fsUserWatchStatistics.setNewUserNum(userTotalData.getNewUserNum());
+                                    } else {
+                                        fsUserWatchStatistics.setUserNum(0);
+                                        fsUserWatchStatistics.setNewUserNum(0);
+                                    }
+                                }
+
+                                String key = String.format("%s-%s", fsUserWatchStatistics.getPeriodId(), fsUserWatchStatistics.getCompanyId());
+                                FsUserWatchStatistics watchData = courseWatchStatisticsMap.get(key);
+
+
+
+                                if(watchData != null){
+                                    fsUserWatchStatistics.setWatchNum(watchData.getWatchNum());
+                                    fsUserWatchStatistics.setCompleteWatchNum(watchData.getCompleteWatchNum());
+                                    fsUserWatchStatistics.setCompleteWatchRate(watchData.getCompleteWatchRate());
+                                } else {
+                                    fsUserWatchStatistics.setWatchNum(0);
+                                    fsUserWatchStatistics.setCompleteWatchNum(0);
+                                    fsUserWatchStatistics.setCompleteWatchRate(BigDecimal.ZERO);
+                                }
+
+                                // 计算上线率
+                                BigDecimal watchNum = new BigDecimal(fsUserWatchStatistics.getWatchNum());
+                                BigDecimal userNum = new BigDecimal(fsUserWatchStatistics.getUserNum());
+                                if(!userNum.equals(BigDecimal.ZERO)){
+                                    BigDecimal onlineRate = watchNum.divide(userNum, 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
+                                    fsUserWatchStatistics.setOnlineRate(onlineRate);
+                                } else {
+                                    fsUserWatchStatistics.setOnlineRate(BigDecimal.ZERO);
+                                }
+
+                                fsUserWatchStatistics.setCreateTime(new Date());
+                                fsUserWatchStatistics.setUpdateTime(new Date());
+                                return fsUserWatchStatistics;
+                            })).collect(Collectors.toList());
+            //2、分批次插入数据
+            this.batchInsert(list);
+        }
+
+
     }
 
     private void batchInsert(List<FsUserWatchStatistics> list) {

+ 14 - 1
fs-service/src/main/java/com/fs/erp/service/impl/DfOrderServiceImpl.java

@@ -20,6 +20,7 @@ import com.fs.erp.service.IErpOrderService;
 import com.fs.his.config.FsSysConfig;
 import com.fs.his.domain.*;
 import com.fs.his.enums.FsStoreOrderLogEnum;
+import com.fs.his.enums.FsStoreOrderStatusEnum;
 import com.fs.his.mapper.*;
 import com.fs.his.param.FsStoreOrderSalesParam;
 import com.fs.his.service.IFsExpressService;
@@ -263,6 +264,10 @@ public class DfOrderServiceImpl implements IErpOrderService
             if ("运单不存在".equals(dfApiResponse.getMsg())){
                 //取消订单
                 FsStoreOrderSalesParam afterSalesParam = new FsStoreOrderSalesParam();
+                //修改订单状态 方便后续重新发货
+                order.setStatus(FsStoreOrderStatusEnum.STATUS_2.getValue());
+                order.setExtendOrderId("");
+                fsStoreOrderMapper.updateFsStoreOrder(order);
                 afterSalesParam.setOrderId(order.getOrderId());
                 afterSalesParam.setReasons("代服管家取消订单");
                 afterSalesParam.setOperator("代服管家");
@@ -272,6 +277,8 @@ public class DfOrderServiceImpl implements IErpOrderService
                 df.setStatus(2);
                 df.setUpdateTime(new Date());
                 fsStoreOrderDfMapper.updateFsStoreOrderDf(df);
+                fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.REFUND_ORDER_DF.getValue(),
+                        "运单不存在,"+FsStoreOrderLogEnum.REFUND_ORDER_DF.getDesc());
                 log.info("代服管家 订单取消成功: {}", response);
             }
             //3.处理请求结果
@@ -329,7 +336,7 @@ public class DfOrderServiceImpl implements IErpOrderService
                         Map<String, Object> config = (Map<String, Object>) JSON.parse(sysConfig.getConfigValue());
                         Object isUpdateOrder = config.get("isUpdateOrder");
                         if (isUpdateOrder == null || "1".equals(isUpdateOrder.toString())) {
-                            fsStoreOrderService.getGoods(order.getOrderId());
+                            fsStoreOrderService.getGoods(order.getOrderId(),"物流自动");
                         }
                         break;
                     case 10:
@@ -339,6 +346,10 @@ public class DfOrderServiceImpl implements IErpOrderService
                         if (fsStoreOrders != null && !fsStoreOrders.isEmpty()) {
                             fsStoreOrders.forEach(tempOrder -> {
                                 FsStoreOrderSalesParam afterSalesParam = new FsStoreOrderSalesParam();
+                                //修改订单状态 方便后续重新发货
+                                order.setStatus(FsStoreOrderStatusEnum.STATUS_2.getValue());
+                                order.setExtendOrderId("");
+                                fsStoreOrderMapper.updateFsStoreOrder(order);
                                 afterSalesParam.setOrderId(tempOrder.getOrderId());
                                 afterSalesParam.setReasons("代服管家取消订单");
                                 afterSalesParam.setOperator("代服管家");
@@ -348,6 +359,8 @@ public class DfOrderServiceImpl implements IErpOrderService
                                 df.setStatus(2);
                                 df.setUpdateTime(new Date());
                                 fsStoreOrderDfMapper.updateFsStoreOrderDf(df);
+                                fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.REFUND_ORDER_DF.getValue(),
+                                        FsStoreOrderLogEnum.REFUND_ORDER_DF.getDesc());
                                 log.info("代服管家 订单取消成功: {}", response);
                             });
                         }

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

@@ -13,6 +13,7 @@ public enum FsStoreOrderLogEnum {
     REMOVE_ORDER("remove_order","删除订单"),
     EVAL_ORDER("order_eval","用户评价"),
     REFUND_ORDER_APPLY("apply_refund","用户申请退款"),
+    REFUND_ORDER_DF("refund_order_df","代服取消订单,申请退款"),
     TAKE_ORDER_DELIVERY("user_take_delivery","用户已收货"),
     PAY_ORDER_SUCCESS("pay_success","用户付款成功"),
     PAY_REMAIN_ORDER_SUCCESS("pay_remain_success","用户付款尾款成功"),
@@ -24,8 +25,12 @@ public enum FsStoreOrderLogEnum {
     FINISH_ORDER("finish","确认收货"),
     LOCK_TUI_MONEY("lock_tui_money","冻结推广金"),
     UNLOCK_TUI_MONEY("unlock_tui_money","解冻推广金"),
-    EDIT_ORDER_PRICE("edit_order_money","改价");
+    EDIT_ORDER_PRICE("edit_order_money","改价"),
 
+    PLATFORM_REVIEW_SALES("PLATFORM_REVIEW_SALES","平台已审核"),
+    WAREHOUSE_REVIEW_SALES("WAREHOUSE_REVIEW_SALES","仓库已审核"),
+    FINANCE_REVIEW_SALES("FINANCE_REVIEW_SALES","财务已审核"),
+    PLATFORM_REVIEW_CANCEL("PLATFORM_REVIEW_CANCEL","平台已取消售后");
     private String value;
     private String desc;
 

+ 1 - 0
fs-service/src/main/java/com/fs/his/mapper/FsStorePaymentMapper.java

@@ -312,4 +312,5 @@ public interface FsStorePaymentMapper
             "</script>"})
     List<FsStorePaymentVO> selectFsStorePaymentListQueryVO(@Param("maps") FsStorePaymentParam fsStorePayment);
 
+    FsStorePayment selectLastByBusinessCode(@Param("orderSn")String orderSn);
 }

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

@@ -93,9 +93,9 @@ public interface IFsStoreOrderService
     List<FsStoreOrderLogs> selectFsStoreOrderLogsList(String orderId);
 
 
-    int sendGoods(FsStoreOrder fsStoreOrder);
+    int sendGoods(FsStoreOrder fsStoreOrder,String opeName);
 
-    int getGoods(Long orderId);
+    int getGoods(Long orderId,String opeName);
 
     int updateMoney(FsStoreOrder fsStoreOrder);
 

+ 12 - 9
fs-service/src/main/java/com/fs/his/service/impl/FsPackageOrderServiceImpl.java

@@ -7,6 +7,7 @@ import java.time.Duration;
 import java.time.LocalDate;
 import java.time.ZoneId;
 import java.util.*;
+import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.TimeUnit;
 
 import cn.hutool.core.bean.BeanUtil;
@@ -24,15 +25,10 @@ import com.fs.common.exception.CustomException;
 import com.fs.common.utils.*;
 import com.fs.common.utils.ip.IpUtils;
 import com.fs.common.utils.poi.ExcelUtil;
-import com.fs.company.domain.Company;
 import com.fs.company.domain.CompanyUser;
 import com.fs.company.mapper.CompanyUserMapper;
-import com.fs.company.vo.CompanyMoneyLogsExportVO;
 import com.fs.core.config.WxPayProperties;
 import com.fs.core.utils.OrderCodeUtils;
-import com.fs.event.TemplateBean;
-import com.fs.event.TemplateEvent;
-import com.fs.event.TemplateListenEnum;
 import com.fs.his.config.FsSysConfig;
 import com.fs.his.domain.*;
 import com.fs.his.dto.PackageConfigDTO;
@@ -54,7 +50,6 @@ import com.fs.huifuPay.domain.HuiFuCreateOrder;
 import com.fs.huifuPay.domain.HuifuCreateOrderResult;
 import com.fs.huifuPay.service.HuiFuService;
 import com.fs.system.domain.SysConfig;
-import com.fs.ybPay.config.PayConfig;
 import com.fs.ybPay.domain.CreateWxOrderResult;
 import com.fs.ybPay.domain.OrderResult;
 import com.fs.ybPay.dto.OrderQueryDTO;
@@ -64,7 +59,6 @@ import com.fs.ybPay.service.IPayService;
 import com.fs.system.mapper.SysConfigMapper;
 import com.fs.system.service.ISysConfigService;
 import com.fs.tzBankPay.TzBankService.TzBankService;
-import com.fs.tzBankPay.config.TzBankConfig;
 import com.fs.tzBankPay.doman.*;
 import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult;
 import com.github.binarywang.wxpay.bean.request.WxPayRefundRequest;
@@ -79,7 +73,6 @@ import com.google.gson.Gson;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationEventPublisher;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
@@ -320,7 +313,7 @@ public class FsPackageOrderServiceImpl implements IFsPackageOrderService
         }
 
         if (param.getType()==1) {
-            if (StringUtils.isBlank(user.getMaOpenId()) && !CloudHostUtils.isCloudHostName("弘德堂")) {
+            if (StringUtils.isBlank(user.getMaOpenId()) && !CloudHostUtils.hasCloudHostName("弘德堂")) {
                 return R.error("用户OPENID不存在");
             }
 
@@ -1406,9 +1399,19 @@ public class FsPackageOrderServiceImpl implements IFsPackageOrderService
         String configValue = sysConfigMapper.selectConfigByConfigKey("his.package").getConfigValue();
         Map<String, Object> config = (Map<String, Object>) JSON.parse(configValue);
         Integer followRate = (Integer)config.get("followRate");
+        List<CompletableFuture<Void>> futures = new ArrayList<>();
         for (FsPackageOrderExcelVO vo : list) {
             vo.setFollowRate(followRate);
+            //银行交易单号
+            CompletableFuture<Void> future = CompletableFuture.runAsync(() -> {
+                FsStorePayment fsStorePayment = fsStorePaymentMapper.selectLastByBusinessCode(vo.getOrderSn());
+                if (fsStorePayment != null) {
+                    vo.setBusinessCode("package-" + fsStorePayment.getBusinessCode());
+                }
+            });
+            futures.add(future);
         }
+        CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).join();
         ExcelUtil<FsPackageOrderExcelVO> util = new ExcelUtil<FsPackageOrderExcelVO>(FsPackageOrderExcelVO.class);
         AjaxResult result= util.exportExcel(list, "套餐包导出");
         FsExportTask task=exportTaskService.selectFsExportTaskByTaskId(fsPackageOrder.getTaskId());

+ 15 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsStoreAfterSalesServiceImpl.java

@@ -32,6 +32,7 @@ import com.fs.his.dto.FsStoreAfterSalesProductDTO;
 import com.fs.his.dto.PayConfigDTO;
 import com.fs.his.enums.FsInquiryOrderStatusEnum;
 import com.fs.his.enums.FsStoreAfterSalesStatusEnum;
+import com.fs.his.enums.FsStoreOrderLogEnum;
 import com.fs.his.enums.FsStoreOrderStatusEnum;
 import com.fs.his.mapper.*;
 import com.fs.his.param.*;
@@ -152,6 +153,8 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService {
     IFsStoreOrderBillLogService fsStoreOrderBillLogService;
     @Autowired
     private ConfigUtil configUtil;
+    @Autowired
+    private IFsStoreOrderLogsService fsStoreOrderLogsService;
 
     /**
      * 查询售后记录
@@ -280,6 +283,9 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService {
         logs.setChangeMessage(FsStoreAfterSalesStatusEnum.STATUS_1.getDesc());
         logs.setOperator(fsStoreAfterSales.getOperator());
         fsStoreAfterSalesLogsMapper.insertFsStoreAfterSalesLogs(logs);
+        //添加订单日志
+        fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.PLATFORM_REVIEW_SALES.getValue(),
+                logs.getOperator()+" "+FsStoreOrderLogEnum.PLATFORM_REVIEW_SALES.getDesc());
         return 1;
     }
 
@@ -306,6 +312,9 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService {
         logs.setChangeMessage(FsStoreAfterSalesStatusEnum.STATUS_6.getDesc() + " " + fsStoreAfterSales.getRemark());
         logs.setOperator(fsStoreAfterSales.getOperator());
         fsStoreAfterSalesLogsMapper.insertFsStoreAfterSalesLogs(logs);
+        //添加订单日志
+        fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.PLATFORM_REVIEW_CANCEL.getValue(),
+                logs.getOperator() + " " +FsStoreOrderLogEnum.PLATFORM_REVIEW_CANCEL.getDesc());
 //        FsStoreOrderLogs Logs = new FsStoreOrderLogs();
 //        Logs.setChangeMessage("已取消退款");
 //        Logs.setOrderId(order.getOrderId());
@@ -383,6 +392,9 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService {
         logs.setChangeMessage(FsStoreAfterSalesStatusEnum.STATUS_4.getDesc());
         logs.setOperator(fsStoreAfterSales.getOperator());
         fsStoreAfterSalesLogsMapper.insertFsStoreAfterSalesLogs(logs);
+        //添加订单日志
+        fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.FINANCE_REVIEW_SALES.getValue(),
+                logs.getOperator() + " " +FsStoreOrderLogEnum.FINANCE_REVIEW_SALES.getDesc());
         //更改订单状态
         FsStoreOrder or = new FsStoreOrder();
         or.setOrderId(order.getOrderId());
@@ -870,6 +882,9 @@ public class FsStoreAfterSalesServiceImpl implements IFsStoreAfterSalesService {
         logs.setChangeMessage(FsStoreAfterSalesStatusEnum.STATUS_3.getDesc());
         logs.setOperator(fsStoreAfterSales.getOperator());
         fsStoreAfterSalesLogsMapper.insertFsStoreAfterSalesLogs(logs);
+        //添加订单日志
+        fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.WAREHOUSE_REVIEW_SALES.getValue(),
+                logs.getOperator() + " " +FsStoreOrderLogEnum.WAREHOUSE_REVIEW_SALES.getDesc());
         return 1;
     }
 

+ 13 - 9
fs-service/src/main/java/com/fs/his/service/impl/FsStoreOrderServiceImpl.java

@@ -426,7 +426,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
 
 
     @Override
-    public int sendGoods(FsStoreOrder fsStoreOrder) {
+    public int sendGoods(FsStoreOrder fsStoreOrder,String opeName) {
         FsStoreOrder order = fsStoreOrderMapper.selectFsStoreOrderByOrderId(fsStoreOrder.getOrderId());
         if (order == null) throw new CustomException("订单不存在");
         if (order.getStatus() != 2) throw new CustomException("非法更改");
@@ -445,12 +445,11 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
             companyService.subtractCompanyMoney(order);
         }
         FsStoreOrderLogs Logs = new FsStoreOrderLogs();
-        Logs.setChangeMessage("订单发货");
+        Logs.setChangeMessage(opeName+" 订单发货");
         Logs.setOrderId(fsStoreOrder.getOrderId());
         Logs.setChangeTime(new DateTime());
         Logs.setChangeType("delivery_goods");
         fsStoreOrderLogsMapper.insertFsStoreOrderLogs(Logs);
-
         String lastFourNumber = "";
         if (order.getDeliveryCode().equals(ShipperCodeEnum.SF.getValue())) {
             lastFourNumber = order.getUserPhone();
@@ -463,8 +462,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
     }
 
     @Override
-    public int getGoods(Long orderId) {
-
+    public int getGoods(Long orderId,String opeName) {
         FsStoreOrder order = fsStoreOrderMapper.selectFsStoreOrderByOrderId(orderId);
         if (order == null) throw new CustomException("订单不存在");
         if (order.getStatus() != FsStoreOrderStatusEnum.STATUS_3.getValue()) throw new CustomException("非法更改");
@@ -482,7 +480,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
         fsUserWatchService.addUserWatch(order);
         int i = fsStoreOrderMapper.updateFsStoreOrder(o1);
         fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.FINISH_ORDER.getValue(),
-                FsStoreOrderLogEnum.FINISH_ORDER.getDesc());
+                opeName + " " +FsStoreOrderLogEnum.FINISH_ORDER.getDesc());
         return i;
     }
 
@@ -1921,7 +1919,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
                                 this.updateFsStoreOrder(map);
                                 //如果是正常签收,更新订单状态
                                 if (dto.getState().equals("3") && (dto.getStateEx().equals("301") || dto.getStateEx().equals("302") || dto.getStateEx().equals("304") || dto.getStateEx().equals("311"))) {
-                                    this.getGoods(order.getOrderId());
+                                    this.getGoods(order.getOrderId(),"物流签收");
                                     //app订单签收通知
                                     try {
                                         uniPush2Service.pushOne(
@@ -2050,7 +2048,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
             Map<String, Object> config = (Map<String, Object>) JSON.parse(sysConfig.getConfigValue());
             Object isUpdateOrder = config.get("isUpdateOrder");
             if (isUpdateOrder == null || "1".equals(isUpdateOrder.toString())) {
-                this.getGoods(order.getOrderId());
+                this.getGoods(order.getOrderId(),"物流签收");
             }
         }
         return R.ok();
@@ -3447,7 +3445,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
                 Map<String, Object> config = (Map<String, Object>) JSON.parse(sysConfig.getConfigValue());
                 Object isUpdateOrder = config.get("isUpdateOrder");
                 if (isUpdateOrder == null || "1".equals(isUpdateOrder.toString())) {
-                    this.getGoods(order.getOrderId());
+                    this.getGoods(order.getOrderId(),"物流签收");
                 }
 
             }
@@ -3543,6 +3541,10 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
                             if (fsStoreOrders != null && !fsStoreOrders.isEmpty()) {
                                 fsStoreOrders.forEach(order -> {
                                     FsStoreOrderSalesParam afterSalesParam = new FsStoreOrderSalesParam();
+                                    //修改订单状态 方便后续重新发货
+                                    order.setStatus(FsStoreOrderStatusEnum.STATUS_2.getValue());
+                                    order.setExtendOrderId("");
+                                    fsStoreOrderMapper.updateFsStoreOrder(order);
                                     afterSalesParam.setOrderId(order.getOrderId());
                                     afterSalesParam.setReasons("代服管家取消订单");
                                     afterSalesParam.setOperator("代服管家");
@@ -3552,6 +3554,8 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
                                     df.setStatus(2);
                                     df.setUpdateTime(new Date());
                                     fsStoreOrderDfMapper.updateFsStoreOrderDf(df);
+                                    fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.REFUND_ORDER_DF.getValue(),
+                                            FsStoreOrderLogEnum.REFUND_ORDER_DF.getDesc());
                                 });
                             }
                         }

+ 3 - 0
fs-service/src/main/java/com/fs/his/vo/FsPackageOrderExcelVO.java

@@ -10,6 +10,9 @@ import java.util.Date;
 @Data
 public class FsPackageOrderExcelVO {
 
+    @Excel(name = "支付订单号")
+    private String businessCode;
+
     @Excel(name = "订单号")
     private String orderSn;
 

+ 71 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductScrm.java

@@ -67,6 +67,9 @@ public class FsStoreProductScrm extends BaseEntity
     @Excel(name = "市场价")
     private BigDecimal otPrice;
 
+    @Excel(name = "市场价")
+    private BigDecimal agentPrice;
+
     /** 邮费 */
     @Excel(name = "邮费")
     private BigDecimal postage;
@@ -183,6 +186,74 @@ public class FsStoreProductScrm extends BaseEntity
     /** 指定企业 */
     private String companyIds;
 
+    /** 店铺ID */
+    @Excel(name = "店铺ID")
+    private Long storeId;
+
+    /** 药品展示图 */
+    @Excel(name = "药品展示图")
+    private String drugImage;
+
+    /** 药品注册证书编号 */
+    @Excel(name = "药品注册证书编号")
+    private String drugRegCertNo;
+
+    /** 通用名称 */
+    @Excel(name = "通用名称")
+    private String commonName;
+
+    /** 剂型 */
+    @Excel(name = "剂型")
+    private String dosageForm;
+
+    /** 单价 */
+    @Excel(name = "单价")
+    private String unitPrice;
+
+    /** 批号 */
+    @Excel(name = "批号")
+    private String batchNumber;
+
+    /** 上市许可持有人 */
+    @Excel(name = "上市许可持有人")
+    private String mah;
+
+    /** 上市许可持有人地址 */
+    @Excel(name = "上市许可持有人地址")
+    private String mahAddress;
+
+    /** 生产企业 */
+    @Excel(name = "生产企业")
+    private String manufacturer;
+
+    /** 生产企业地址 */
+    @Excel(name = "生产企业地址")
+    private String manufacturerAddress;
+
+    /** 功能主治 */
+    @Excel(name = "功能主治")
+    private String indications;
+
+    /** 用法用量 */
+    @Excel(name = "用法用量")
+    private String dosage;
+
+    /** 不良反应 */
+    @Excel(name = "不良反应")
+    private String adverseReactions;
+
+    /** 禁忌 */
+    @Excel(name = "禁忌")
+    private String contraindications;
+
+    /** 注意事项 */
+    @Excel(name = "注意事项")
+    private String precautions;
+
+    /** 审核状态(0未审核1审核通过2审核退回) */
+    @Excel(name = "审核状态(0未审核1审核通过2审核退回)")
+    private String isAudit;
+
     /**
      * 商品图片
      */

+ 2 - 1
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java

@@ -72,7 +72,8 @@ public interface FsStoreProductScrmMapper
      */
     public int deleteFsStoreProductByIds(Long[] productIds);
     @Select({"<script> " +
-            "select p.*,pc.cate_name  from fs_store_product_scrm p left join fs_store_product_category_scrm pc on p.cate_id=pc.cate_id   " +
+            "select p.*,pc.cate_name, fs_store.store_name from fs_store_product_scrm p left join fs_store_product_category_scrm pc on p.cate_id=pc.cate_id  " +
+            "left join fs_store on fs_store.store_id = p.store_id " +
             "where 1=1 " +
             "<if test = 'maps.productName != null and  maps.productName !=\"\"    '> " +
             "and p.product_name like CONCAT('%',#{maps.productName},'%') " +

+ 122 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreProductAddEditParam.java

@@ -1,5 +1,6 @@
 package com.fs.hisStore.param;
 
+import com.fs.common.annotation.Excel;
 import com.fs.hisStore.domain.FsStoreProductAttrValueScrm;
 import com.fs.hisStore.dto.ProductArrtDTO;
 import lombok.Data;
@@ -138,6 +139,127 @@ public class FsStoreProductAddEditParam implements Serializable
 
     private Integer tuiCateId;
 
+    /** 店铺ID */
+    @Excel(name = "店铺ID")
+    private Long storeId;
+
+    /** 药品展示图 */
+    @Excel(name = "药品展示图")
+    private String drugImage;
+
+    /** 药品注册证书编号 */
+    @Excel(name = "药品注册证书编号")
+    private String drugRegCertNo;
+
+    /** 通用名称 */
+    @Excel(name = "通用名称")
+    private String commonName;
+
+    /** 剂型 */
+    @Excel(name = "剂型")
+    private String dosageForm;
+
+    /** 单价 */
+    @Excel(name = "单价")
+    private String unitPrice;
+
+    /** 批号 */
+    @Excel(name = "批号")
+    private String batchNumber;
+
+    /** 上市许可持有人 */
+    @Excel(name = "上市许可持有人")
+    private String mah;
+
+    /** 上市许可持有人地址 */
+    @Excel(name = "上市许可持有人地址")
+    private String mahAddress;
+
+    /** 生产企业 */
+    @Excel(name = "生产企业")
+    private String manufacturer;
+
+    /** 生产企业地址 */
+    @Excel(name = "生产企业地址")
+    private String manufacturerAddress;
+
+    /** 功能主治 */
+    @Excel(name = "功能主治")
+    private String indications;
+
+    /** 用法用量 */
+    @Excel(name = "用法用量")
+    private String dosage;
+
+    /** 不良反应 */
+    @Excel(name = "不良反应")
+    private String adverseReactions;
+
+    /** 禁忌 */
+    @Excel(name = "禁忌")
+    private String contraindications;
+
+    /** 注意事项 */
+    @Excel(name = "注意事项")
+    private String precautions;
+
+    /** 审核状态(0未审核1审核通过2审核退回) */
+    @Excel(name = "审核状态(0未审核1审核通过2审核退回)")
+    private String isAudit;
+
+    /**
+     * 商品图片
+     */
+    @Excel(name = "商品图片")
+    private String imgUrl;
+
+    /**
+     * 轮播图
+     */
+    @Excel(name = "轮播图")
+    private String images;
+
+    /**
+     * 商品介绍
+     */
+    @Excel(name = "商品介绍")
+    private String productIntroduce;
+
+    /**
+     * 产品描述
+     */
+    @Excel(name = "产品描述")
+    private String desc;
+    /**
+     * 成本价
+     */
+    @Excel(name = "成本价")
+    private BigDecimal costPrice;
+
+    /**
+     * 浏览量
+     */
+    @Excel(name = "浏览量")
+    private Long views;
+
+    /**
+     * 产品二维码地址(用户小程序海报)
+     */
+    @Excel(name = "产品二维码地址(用户小程序海报)")
+    private String codeUrl;
+    /**
+     * 商品类型:1非处方 2处方
+     */
+    @Excel(name = "是否为处方药:1非处方 2处方")
+    private Integer isPrescribe;
+
+
+    /** 品牌 */
+    @Excel(name = "品牌")
+    private String brand;
+
+    private Integer isDrug;
+
     //属性项目
     private List<ProductArrtDTO> items;
     //sku结果集

+ 17 - 0
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreAfterSalesScrmServiceImpl.java

@@ -21,8 +21,10 @@ import com.fs.erp.service.IErpOrderService;
 import com.fs.his.config.FsSysConfig;
 import com.fs.his.domain.*;
 import com.fs.his.enums.FsStoreAfterSalesStatusEnum;
+import com.fs.his.enums.FsStoreOrderLogEnum;
 import com.fs.his.enums.FsStoreOrderStatusEnum;
 import com.fs.his.mapper.*;
+import com.fs.his.service.IFsStoreOrderLogsService;
 import com.fs.his.utils.ConfigUtil;
 import com.fs.his.vo.FsStoreAfterSalesExcelVO;
 import com.fs.his.vo.FsStoreAfterSalesLogsVO;
@@ -181,6 +183,9 @@ public class FsStoreAfterSalesScrmServiceImpl implements IFsStoreAfterSalesScrmS
     @Autowired
     private TzBankService tzBankService;
 
+    @Autowired
+    private IFsStoreOrderLogsService fsStoreOrderLogsService;
+
     /**
      * 查询售后记录
      *
@@ -1106,6 +1111,9 @@ public class FsStoreAfterSalesScrmServiceImpl implements IFsStoreAfterSalesScrmS
         logs.setChangeMessage(FsStoreAfterSalesStatusEnum.STATUS_1.getDesc());
         logs.setOperator(fsStoreAfterSales.getOperator());
         fsStoreAfterSalesLogsMapper.insertFsStoreAfterSalesLogs(logs);
+        //添加订单日志
+        fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.PLATFORM_REVIEW_SALES.getValue(),
+                logs.getOperator()+" "+FsStoreOrderLogEnum.PLATFORM_REVIEW_SALES.getDesc());
         return 1;
     }
 
@@ -1128,6 +1136,9 @@ public class FsStoreAfterSalesScrmServiceImpl implements IFsStoreAfterSalesScrmS
         logs.setChangeMessage(FsStoreAfterSalesStatusEnum.STATUS_3.getDesc());
         logs.setOperator(fsStoreAfterSales.getOperator());
         fsStoreAfterSalesLogsMapper.insertFsStoreAfterSalesLogs(logs);
+        //添加订单日志
+        fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.WAREHOUSE_REVIEW_SALES.getValue(),
+                logs.getOperator() + " " +FsStoreOrderLogEnum.WAREHOUSE_REVIEW_SALES.getDesc());
         return 1;
     }
 
@@ -1153,6 +1164,9 @@ public class FsStoreAfterSalesScrmServiceImpl implements IFsStoreAfterSalesScrmS
         logs.setChangeMessage(FsStoreAfterSalesStatusEnum.STATUS_6.getDesc() + " " + fsStoreAfterSales.getRemark());
         logs.setOperator(fsStoreAfterSales.getOperator());
         fsStoreAfterSalesLogsMapper.insertFsStoreAfterSalesLogs(logs);
+        //添加订单日志
+        fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.PLATFORM_REVIEW_CANCEL.getValue(),
+                logs.getOperator() + " " +FsStoreOrderLogEnum.PLATFORM_REVIEW_CANCEL.getDesc());
 //        FsStoreOrderLogsScrm Logs = new FsStoreOrderLogsScrm();
 //        Logs.setChangeMessage("已取消退款");
 //        Logs.setOrderId(order.getOrderId());
@@ -1229,6 +1243,9 @@ public class FsStoreAfterSalesScrmServiceImpl implements IFsStoreAfterSalesScrmS
         logs.setChangeMessage(FsStoreAfterSalesStatusEnum.STATUS_4.getDesc());
         logs.setOperator(fsStoreAfterSales.getOperator());
         fsStoreAfterSalesLogsMapper.insertFsStoreAfterSalesLogs(logs);
+        //添加订单日志
+        fsStoreOrderLogsService.create(order.getOrderId(), FsStoreOrderLogEnum.FINANCE_REVIEW_SALES.getValue(),
+                logs.getOperator() + " " +FsStoreOrderLogEnum.FINANCE_REVIEW_SALES.getDesc());
         //更改订单状态
         FsStoreOrderScrm or = new FsStoreOrderScrm();
         or.setId(order.getOrderId());

+ 2 - 0
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductScrmServiceImpl.java

@@ -311,6 +311,7 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
             product.setStock(Long.parseLong(countDto.getStock().toString()));
             product.setCompanyIds(param.getCompanyIds());
             product.setVideo(param.getVideo());
+//            product.setIsDrug(param.getIsDrug());
             fsStoreProductMapper.updateFsStoreProduct(product);
             if (param.getSpecType().equals(0)) {
                 ProductArrtDTO fromatDetailDto = ProductArrtDTO.builder()
@@ -335,6 +336,7 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
             product.setStock(Long.parseLong(countDto.getStock().toString()));
             product.setCompanyIds(param.getCompanyIds());
             product.setVideo(param.getVideo());
+//            product.setIsDrug(param.getIsDrug());
             fsStoreProductMapper.insertFsStoreProduct(product);
             if (param.getSpecType().equals(0)) {
                 ProductArrtDTO fromatDetailDto = ProductArrtDTO.builder()

+ 5 - 0
fs-service/src/main/java/com/fs/hisStore/vo/FsStoreProductListVO.java

@@ -78,4 +78,9 @@ public class FsStoreProductListVO  implements Serializable
      * 所属公司
      */
     private String companyName;
+
+    /**
+     * 所属店铺
+     */
+    private String storeName;
 }

+ 1 - 1
fs-service/src/main/resources/application-config-druid-hzyy.yml

@@ -43,7 +43,7 @@ wx:
       timeout: 2000
     configs:
       - appId: wx894a6220c608f5c1 # 第一个公众号的appid  //公众号名称:弘珍医药
-        secret: dabd5168d58c66e97be1ab1eee346b20 # 公众号的appsecret
+        secret: 9470f0c410e1365ab64808af9a994467 # 公众号的appsecret
         token: PPKOdAlCoMO # 接口配置里的Token值
         aesKey: Eswa6VjwtVMCcw03qZy6fWllgrv5aytIA1SZPEU0kU2 # 接口配置里的EncodingAESKey值
 aifabu:  #爱链接

+ 12 - 6
fs-service/src/main/resources/mapper/company/CompanyDeptMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.fs.company.mapper.CompanyDeptMapper">
-    
+
     <resultMap type="CompanyDept" id="CompanyDeptResult">
         <result property="deptId"    column="dept_id"    />
         <result property="parentId"    column="parent_id"    />
@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectCompanyDeptList" parameterType="CompanyDept" resultMap="CompanyDeptResult">
         <include refid="selectCompanyDeptVo"/>
-        <where>  
+        <where>
             <if test="parentId != null "> and parent_id = #{parentId}</if>
             <if test="companyId != null "> and company_id = #{companyId}</if>
             <if test="ancestors != null  and ancestors != ''"> and ancestors = #{ancestors}</if>
@@ -40,12 +40,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="status != null  and status != ''"> and status = #{status}</if>
         </where>
     </select>
-    
+
     <select id="selectCompanyDeptById" parameterType="Long" resultMap="CompanyDeptResult">
         <include refid="selectCompanyDeptVo"/>
         where dept_id = #{deptId}
     </select>
-        
+
     <insert id="insertCompanyDept" parameterType="CompanyDept" useGeneratedKeys="true" keyProperty="deptId">
         insert into company_dept
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -108,11 +108,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteCompanyDeptByIds" parameterType="String">
-        delete from company_dept where dept_id in 
+        delete from company_dept where dept_id in
         <foreach item="deptId" collection="array" open="(" separator="," close=")">
             #{deptId}
         </foreach>
     </delete>
+    <delete id="deleteCompanyDeptByCompanyIds">
+        delete from company_dept where company_id in
+        <foreach item="companyId" collection="array" open="(" separator="," close=")">
+            #{companyId}
+        </foreach>
+    </delete>
 
     <select id="selectDeptListByRoleId" resultType="Integer">
         select d.dept_id
@@ -165,4 +171,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select * from company_dept where find_in_set(#{deptId}, ancestors)
     </select>
 
-</mapper>
+</mapper>

+ 6 - 1
fs-service/src/main/resources/mapper/course/FsUserCourseVideoRedPackageMapper.xml

@@ -63,7 +63,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
-
+    <delete id="deleteFsUserCourseVideoRedPackageByVedioIds" parameterType="String">
+        delete from fs_user_course_video_red_package where video_id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
     <!-- 批量查询匹配的红包数据 -->
     <select id="selectByParamsList" resultMap="FsUserCourseVideoRedPackageResult">
         select id, company_id, video_id, red_packet_money, period_id, data_type

+ 7 - 6
fs-service/src/main/resources/mapper/his/FsMaterialMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.fs.his.mapper.FsMaterialMapper">
-    
+
     <resultMap type="FsMaterial" id="FsMaterialResult">
         <result property="materialId"    column="material_id"    />
         <result property="type"    column="type"    />
@@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectFsMaterialList" parameterType="FsMaterial" resultMap="FsMaterialResult">
         <include refid="selectFsMaterialVo"/>
-        <where>  
+        <where>
             <if test="type != null  and type != ''"> and type = #{type}</if>
             <if test="groupId != null "> and group_id = #{groupId}</if>
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
@@ -32,13 +32,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createUserId != null "> and create_user_id = #{createUserId}</if>
             <if test="storeId != null "> and store_id = #{storeId}</if>
         </where>
+        order by create_time desc
     </select>
-    
+
     <select id="selectFsMaterialByMaterialId" parameterType="Long" resultMap="FsMaterialResult">
         <include refid="selectFsMaterialVo"/>
         where material_id = #{materialId}
     </select>
-        
+
     <insert id="insertFsMaterial" parameterType="FsMaterial" useGeneratedKeys="true" keyProperty="materialId">
         insert into fs_material
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -86,9 +87,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteFsMaterialByMaterialIds" parameterType="String">
-        delete from fs_material where material_id in 
+        delete from fs_material where material_id in
         <foreach item="materialId" collection="array" open="(" separator="," close=")">
             #{materialId}
         </foreach>
     </delete>
-</mapper>
+</mapper>

+ 3 - 0
fs-service/src/main/resources/mapper/his/FsStorePaymentMapper.xml

@@ -261,4 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and DATE(sp.pay_time) &lt;= DATE(#{maps.payEndTime})
         </if>
     </select>
+    <select id="selectLastByBusinessCode" resultType="com.fs.his.domain.FsStorePayment">
+        select * from fs_store_payment where business_code like #{orderSn} order by create_time desc limit 1
+    </select>
 </mapper>

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

@@ -1853,7 +1853,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             1 = 1
             AND (u.nickname IS NOT NULL or u.nick_name IS NOT NULL)
             <if test = "maps.nickname != null and  maps.nickname !='' " >
-                AND u.nickname LIKE CONCAT("%",#{maps.nickname},"%")
+                AND (
+                     u.nickname LIKE CONCAT("%",#{maps.nickname},"%")
+                    or
+                    u.nick_name LIKE CONCAT("%",#{maps.nickname},"%")
+                )
             </if >
             <if test = "maps.userId != null and  maps.userId !='' " >
                 AND u.user_id = #{maps.userId}
@@ -1875,6 +1879,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test = "maps.companyId != null and maps.companyId != '' " >
                 AND company.company_id = #{maps.companyId}
             </if >
+            <if test = "maps.companyUserId != null" >
+                AND company_user.user_id = #{maps.companyUserId}
+            </if >
             <if test = "maps.projectId != null" >
                 AND ucu.project_id = #{maps.projectId}
             </if >

+ 78 - 2
fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml

@@ -6,8 +6,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <resultMap type="FsStoreProductScrm" id="FsStoreProductResult">
         <result property="productId"    column="product_id"    />
-        <result property="image"    column="image"    />
         <result property="video"    column="video"    />
+        <result property="image"    column="image"    />
         <result property="sliderImage"    column="slider_image"    />
         <result property="productName"    column="product_name"    />
         <result property="productInfo"    column="product_info"    />
@@ -17,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="price"    column="price"    />
         <result property="vipPrice"    column="vip_price"    />
         <result property="otPrice"    column="ot_price"    />
+        <result property="agentPrice"    column="agent_price"    />
         <result property="postage"    column="postage"    />
         <result property="unitName"    column="unit_name"    />
         <result property="sort"    column="sort"    />
@@ -49,10 +50,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isDisplay"    column="is_display"    />
         <result property="tuiCateId"    column="tui_cate_id"    />
         <result property="companyIds"    column="company_ids"    />
+        <result property="storeId"    column="store_id"    />
+        <result property="isDrug"    column="is_drug"    />
+        <result property="drugImage"    column="drug_image"    />
+        <result property="drugRegCertNo"    column="drug_reg_cert_no"    />
+        <result property="commonName"    column="common_name"    />
+        <result property="dosageForm"    column="dosage_form"    />
+        <result property="unitPrice"    column="unit_price"    />
+        <result property="batchNumber"    column="batch_number"    />
+        <result property="mah"    column="mah"    />
+        <result property="mahAddress"    column="mah_address"    />
+        <result property="manufacturer"    column="manufacturer"    />
+        <result property="manufacturerAddress"    column="manufacturer_address"    />
+        <result property="indications"    column="indications"    />
+        <result property="dosage"    column="dosage"    />
+        <result property="adverseReactions"    column="adverse_reactions"    />
+        <result property="contraindications"    column="contraindications"    />
+        <result property="precautions"    column="precautions"    />
+        <result property="isAudit"    column="is_audit"    />
     </resultMap>
 
     <sql id="selectFsStoreProductVo">
-        select product_id, image,video, slider_image, product_name, product_info, keyword, bar_code, cate_id, price, vip_price, ot_price, postage, unit_name, sort, sales, stock, is_show, is_hot, is_benefit, is_best, is_new, description, create_time, update_time, is_postage, is_del, give_integral, cost, is_good, browse, code_path, temp_id, spec_type, is_integral, integral, product_type, prescribe_code, prescribe_spec, prescribe_factory, prescribe_name,is_display,tui_cate_id,company_ids from fs_store_product_scrm
+        select product_id, video, image, slider_image, product_name, product_info, keyword, bar_code, cate_id, price, vip_price, ot_price, agent_price, postage, unit_name, sort, sales, stock, is_show, is_hot, is_benefit, is_best, is_new, description, create_time, update_time, is_postage, is_del, give_integral, cost, is_good, browse, code_path, temp_id, spec_type, is_integral, integral, product_type, prescribe_code, prescribe_spec, prescribe_factory, prescribe_name, is_display, tui_cate_id, company_ids, store_id, is_drug, drug_image, drug_reg_cert_no, common_name, dosage_form, unit_price, batch_number, mah, mah_address, manufacturer, manufacturer_address, indications, dosage, adverse_reactions, contraindications, precautions, is_audit from fs_store_product_scrm
     </sql>
 
     <select id="selectFsStoreProductByProductId" parameterType="Long" resultMap="FsStoreProductResult">
@@ -136,6 +155,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="price != null">price,</if>
             <if test="vipPrice != null">vip_price,</if>
             <if test="otPrice != null">ot_price,</if>
+            <if test="agentPrice != null">agent_price,</if>
             <if test="postage != null">postage,</if>
             <if test="unitName != null">unit_name,</if>
             <if test="sort != null">sort,</if>
@@ -168,6 +188,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDisplay != null">is_display,</if>
             <if test="tuiCateId != null">tui_cate_id,</if>
             <if test="companyIds != null and companyIds != ''">company_ids,</if>
+            <if test="storeId != null">store_id,</if>
+            <if test="isDrug != null">is_drug,</if>
+            <if test="drugImage != null">drug_image,</if>
+            <if test="drugRegCertNo != null">drug_reg_cert_no,</if>
+            <if test="commonName != null">common_name,</if>
+            <if test="dosageForm != null">dosage_form,</if>
+            <if test="unitPrice != null">unit_price,</if>
+            <if test="batchNumber != null">batch_number,</if>
+            <if test="mah != null">mah,</if>
+            <if test="mahAddress != null">mah_address,</if>
+            <if test="manufacturer != null">manufacturer,</if>
+            <if test="manufacturerAddress != null">manufacturer_address,</if>
+            <if test="indications != null">indications,</if>
+            <if test="dosage != null">dosage,</if>
+            <if test="adverseReactions != null">adverse_reactions,</if>
+            <if test="contraindications != null">contraindications,</if>
+            <if test="precautions != null">precautions,</if>
+            <if test="isAudit != null">is_audit,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="image != null and image != ''">#{image},</if>
@@ -181,6 +219,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="price != null">#{price},</if>
             <if test="vipPrice != null">#{vipPrice},</if>
             <if test="otPrice != null">#{otPrice},</if>
+            <if test="agentPrice != null">#{agentPrice},</if>
             <if test="postage != null">#{postage},</if>
             <if test="unitName != null">#{unitName},</if>
             <if test="sort != null">#{sort},</if>
@@ -213,6 +252,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDisplay != null">#{isDisplay},</if>
             <if test="tuiCateId != null">#{tuiCateId},</if>
             <if test="companyIds != null and companyIds != ''">#{companyIds},</if>
+            <if test="storeId != null">#{storeId},</if>
+            <if test="isDrug != null">#{isDrug},</if>
+            <if test="drugImage != null">#{drugImage},</if>
+            <if test="drugRegCertNo != null">#{drugRegCertNo},</if>
+            <if test="commonName != null">#{commonName},</if>
+            <if test="dosageForm != null">#{dosageForm},</if>
+            <if test="unitPrice != null">#{unitPrice},</if>
+            <if test="batchNumber != null">#{batchNumber},</if>
+            <if test="mah != null">#{mah},</if>
+            <if test="mahAddress != null">#{mahAddress},</if>
+            <if test="manufacturer != null">#{manufacturer},</if>
+            <if test="manufacturerAddress != null">#{manufacturerAddress},</if>
+            <if test="indications != null">#{indications},</if>
+            <if test="dosage != null">#{dosage},</if>
+            <if test="adverseReactions != null">#{adverseReactions},</if>
+            <if test="contraindications != null">#{contraindications},</if>
+            <if test="precautions != null">#{precautions},</if>
+            <if test="isAudit != null">#{isAudit},</if>
          </trim>
     </insert>
 
@@ -230,6 +287,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="price != null">price = #{price},</if>
             <if test="vipPrice != null">vip_price = #{vipPrice},</if>
             <if test="otPrice != null">ot_price = #{otPrice},</if>
+            <if test="agentPrice != null">agent_price = #{agentPrice},</if>
             <if test="postage != null">postage = #{postage},</if>
             <if test="unitName != null">unit_name = #{unitName},</if>
             <if test="sort != null">sort = #{sort},</if>
@@ -262,6 +320,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDisplay != null">is_display = #{isDisplay},</if>
             <if test="tuiCateId != null">tui_cate_id = #{tuiCateId},</if>
             <if test="companyIds != null and companyIds != ''">company_ids = #{companyIds},</if>
+            <if test="storeId != null">store_id = #{storeId},</if>
+            <if test="isDrug != null">is_drug = #{isDrug},</if>
+            <if test="drugImage != null">drug_image = #{drugImage},</if>
+            <if test="drugRegCertNo != null">drug_reg_cert_no = #{drugRegCertNo},</if>
+            <if test="commonName != null">common_name = #{commonName},</if>
+            <if test="dosageForm != null">dosage_form = #{dosageForm},</if>
+            <if test="unitPrice != null">unit_price = #{unitPrice},</if>
+            <if test="batchNumber != null">batch_number = #{batchNumber},</if>
+            <if test="mah != null">mah = #{mah},</if>
+            <if test="mahAddress != null">mah_address = #{mahAddress},</if>
+            <if test="manufacturer != null">manufacturer = #{manufacturer},</if>
+            <if test="manufacturerAddress != null">manufacturer_address = #{manufacturerAddress},</if>
+            <if test="indications != null">indications = #{indications},</if>
+            <if test="dosage != null">dosage = #{dosage},</if>
+            <if test="adverseReactions != null">adverse_reactions = #{adverseReactions},</if>
+            <if test="contraindications != null">contraindications = #{contraindications},</if>
+            <if test="precautions != null">precautions = #{precautions},</if>
+            <if test="isAudit != null">is_audit = #{isAudit},</if>
         </trim>
         where product_id = #{productId}
     </update>

+ 2 - 2
fs-store/src/main/java/com/fs/store/controller/store/FsStoreOrderController.java

@@ -245,7 +245,7 @@ public class FsStoreOrderController extends BaseController
     @PutMapping("/sendGoods")
     public AjaxResult sendGoods(@RequestBody FsStoreOrder fsStoreOrder)
     {
-        return toAjax(fsStoreOrderService.sendGoods(fsStoreOrder));
+        return toAjax(fsStoreOrderService.sendGoods(fsStoreOrder,"店铺端"));
     }
 
 
@@ -256,7 +256,7 @@ public class FsStoreOrderController extends BaseController
     @PutMapping("/getGoods")
     public AjaxResult getGoods(@RequestBody FsStoreOrder fsStoreOrder)
     {
-        return toAjax(fsStoreOrderService.getGoods(fsStoreOrder.getOrderId()));
+        return toAjax(fsStoreOrderService.getGoods(fsStoreOrder.getOrderId(),"店铺端"));
     }
 
     /**

+ 1 - 1
fs-user-app/src/main/java/com/fs/app/controller/AdvController.java

@@ -26,7 +26,7 @@ public class AdvController {
 	@Autowired
 	private IFsAdvService advService;
 
-	@Cacheable(value="getAdvList", key="#map")
+//	@Cacheable(value="getAdvList", key="#map")
 	@ApiOperation("获取首页广告位")
 	@GetMapping("/getAdvList")
 	public R getAdvList(FsAdvUParam map){

+ 0 - 2
fs-user-app/src/main/java/com/fs/app/controller/CommonController.java

@@ -603,6 +603,4 @@ public class CommonController {
 		return R.error("获取域名失败,请检查后台配置!");
 	}
 
-
-
 }

+ 2 - 2
fs-user-app/src/main/java/com/fs/app/controller/CourseController.java

@@ -47,7 +47,7 @@ public class CourseController extends  AppBaseController{
     private IFsCourseSopAppLinkService courseSopAppLinkService;
 
 
-    @Cacheable(value="getCourseCate" )
+//    @Cacheable(value="getCourseCate" )
     @ApiOperation("获取分类")
     @GetMapping("/getCourseCate")
     public R getCourseCate(){
@@ -70,7 +70,7 @@ public class CourseController extends  AppBaseController{
             return R.error("操作异常");
         }
     }
-    @Cacheable(value = "getCourseList",key = "#param" )
+//    @Cacheable(value = "getCourseList",key = "#param" )
     @ApiOperation("课程列表")
     @GetMapping("/getCourseList")
     public R getCourseList(FsUserCourseListUParam param)

+ 2 - 3
fs-user-app/src/main/java/com/fs/app/controller/InquiryOrderController.java

@@ -1,7 +1,6 @@
 package com.fs.app.controller;
 
 
-import cn.hutool.core.util.IdUtil;
 import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -145,7 +144,7 @@ public class InquiryOrderController extends  AppBaseController {
         }
 
         if (param.getType() == 1) {
-            if (StringUtils.isBlank(user.getMaOpenId()) && !CloudHostUtils.isCloudHostName("弘德堂")) {
+            if (StringUtils.isBlank(user.getMaOpenId()) && !CloudHostUtils.hasCloudHostName("弘德堂")) {
                 return R.error("用户OPENID不存在");
             }
 
@@ -181,7 +180,7 @@ public class InquiryOrderController extends  AppBaseController {
         if(user!=null){
 
             // 红德堂特殊处理
-            if (!CloudHostUtils.isCloudHostName("弘德堂") && StringUtils.isBlank(user.getMaOpenId())) {
+            if (!CloudHostUtils.hasCloudHostName("弘德堂") && StringUtils.isBlank(user.getMaOpenId())) {
                 return R.error("用户OPENID不存在");
             }