Browse Source

医健宝功能新增

吴树波 1 week ago
parent
commit
733c102260

+ 2 - 2
fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreProductScrmController.java

@@ -181,8 +181,8 @@ public class FsStoreProductScrmController extends BaseController
 
 
     @ApiOperation(value = "生成属性")
     @ApiOperation(value = "生成属性")
     @PostMapping(value = "/genFormatAttr/{productId}")
     @PostMapping(value = "/genFormatAttr/{productId}")
-    public ResponseEntity genFormatAttr(@PathVariable Long productId, @RequestBody String jsonStr){
-        return new ResponseEntity<>(fsStoreProductService.getFormatAttr(productId,jsonStr), HttpStatus.OK);
+    public ResponseEntity genFormatAttr(@PathVariable Long productId, @RequestBody String jsonStr,Long[] stores){
+        return new ResponseEntity<>(fsStoreProductService.getFormatAttr(productId,jsonStr, stores), HttpStatus.OK);
     }
     }
 
 
 
 

+ 3 - 1
fs-company/src/main/java/com/fs/company/controller/qw/QwSopLogsController.java

@@ -149,7 +149,9 @@ public class QwSopLogsController extends BaseController
      * 我的自动化任务 和部门自动化任务 就只显示自己的或者部门的
      * 我的自动化任务 和部门自动化任务 就只显示自己的或者部门的
      */
      */
     private List<Long> getQwUserKeyList(QwSopLogsParam param, LoginUser loginUser) {
     private List<Long> getQwUserKeyList(QwSopLogsParam param, LoginUser loginUser) {
-
+        if(param.getFilterSopType() == null){
+            return new ArrayList<>(); // 返回空列表而不是null
+        }
         switch (param.getFilterSopType()) {
         switch (param.getFilterSopType()) {
             case 2:
             case 2:
                 CompanyUser companyUser = iCompanyUserService.selectCompanyUserById(loginUser.getUser().getUserId());
                 CompanyUser companyUser = iCompanyUserService.selectCompanyUserById(loginUser.getUser().getUserId());

+ 2 - 2
fs-company/src/main/java/com/fs/company/controller/qw/SopUserLogsController.java

@@ -83,10 +83,10 @@ public class SopUserLogsController extends BaseController
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
 
 
         List<String> qwUserIdList=null;
         List<String> qwUserIdList=null;
-        if (sopUserLogs.getType()==2){
+        if (sopUserLogs.getType() != null && sopUserLogs.getType()==2){
             qwUserIdList = iQwUserService.selectQwUserListByCompanyUserId(loginUser.getUser().getUserId(), sopUserLogs.getCorpId());
             qwUserIdList = iQwUserService.selectQwUserListByCompanyUserId(loginUser.getUser().getUserId(), sopUserLogs.getCorpId());
         }
         }
-        if (qwUserIdList!=null&& !qwUserIdList.isEmpty() && sopUserLogs.getType()==2 ){
+        if (qwUserIdList!=null&& !qwUserIdList.isEmpty() && sopUserLogs.getType() != null &&  sopUserLogs.getType()==2 ){
             sopUserLogs.setQwIdsList(qwUserIdList);
             sopUserLogs.setQwIdsList(qwUserIdList);
         }
         }
 
 

+ 26 - 6
fs-ipad-task/src/main/java/com/fs/app/service/IpadSendServer.java

@@ -1,9 +1,12 @@
 package com.fs.app.service;
 package com.fs.app.service;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.fs.common.core.redis.RedisCache;
 import com.fs.common.core.redis.RedisCache;
+import com.fs.common.exception.base.BaseException;
 import com.fs.common.utils.StringUtils;
 import com.fs.common.utils.StringUtils;
 import com.fs.common.utils.date.DateUtil;
 import com.fs.common.utils.date.DateUtil;
-import com.fs.course.config.CourseMaConfig;
+import com.fs.company.domain.CompanyMiniapp;
+import com.fs.company.service.ICompanyMiniappService;
 import com.fs.course.domain.FsCoursePlaySourceConfig;
 import com.fs.course.domain.FsCoursePlaySourceConfig;
 import com.fs.course.domain.FsCourseWatchLog;
 import com.fs.course.domain.FsCourseWatchLog;
 import com.fs.course.service.IFsCourseWatchLogService;
 import com.fs.course.service.IFsCourseWatchLogService;
@@ -15,7 +18,6 @@ import com.fs.qw.mapper.QwExternalContactMapper;
 import com.fs.qw.mapper.QwUserMapper;
 import com.fs.qw.mapper.QwUserMapper;
 import com.fs.qw.service.IQwUserService;
 import com.fs.qw.service.IQwUserService;
 import com.fs.qw.service.IQwUserVideoService;
 import com.fs.qw.service.IQwUserVideoService;
-import com.fs.qw.service.impl.QwUserServiceImpl;
 import com.fs.qw.vo.QwSopCourseFinishTempSetting;
 import com.fs.qw.vo.QwSopCourseFinishTempSetting;
 import com.fs.qwApi.param.QwExternalContactHParam;
 import com.fs.qwApi.param.QwExternalContactHParam;
 import com.fs.sop.domain.QwSopLogs;
 import com.fs.sop.domain.QwSopLogs;
@@ -27,6 +29,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import java.time.LocalDateTime;
 import java.time.LocalDateTime;
+import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
 @Slf4j
 @Slf4j
@@ -42,9 +45,26 @@ public class IpadSendServer {
     private final IFsCourseWatchLogService watchLogService;
     private final IFsCourseWatchLogService watchLogService;
     private final IQwUserVideoService qwUserVideoService;
     private final IQwUserVideoService qwUserVideoService;
     private final RedisCache redisCache;
     private final RedisCache redisCache;
+    private final ICompanyMiniappService companyMiniappService;
 
 
-    private void sendMiniProgram(BaseVo vo, QwSopCourseFinishTempSetting.Setting content, Map<String, FsCoursePlaySourceConfig> miniMap) {
-        FsCoursePlaySourceConfig courseMaConfig = miniMap.get(content.getMiniprogramAppid());
+    private void sendMiniProgram(BaseVo vo, QwSopCourseFinishTempSetting.Setting content, Map<String, FsCoursePlaySourceConfig> miniMap, Long companyId) {
+        String appid = content.getMiniprogramAppid();
+        if(companyId != null && content.getMiniType() != null){
+            List<CompanyMiniapp> list = companyMiniappService.list(new QueryWrapper<CompanyMiniapp>().eq("company_id", companyId).eq("type", content.getMiniType()));
+            if(!list.isEmpty() && list.get(0) != null && StringUtils.isNotEmpty(list.get(0).getAppId())){
+                appid = list.get(0).getAppId();
+            }
+        }
+        FsCoursePlaySourceConfig courseMaConfig = miniMap.get(appid);
+        if(courseMaConfig == null){
+            List<CompanyMiniapp> list = companyMiniappService.list(new QueryWrapper<CompanyMiniapp>().eq("company_id", companyId).eq("type", 1));
+            if(!list.isEmpty() && list.get(0) != null && StringUtils.isNotEmpty(list.get(0).getAppId())){
+                courseMaConfig = miniMap.get(list.get(0).getAppId());
+            }
+        }
+        if(courseMaConfig == null){
+            throw new BaseException("未找到小程序配置:{}", appid);
+        }
         // 小程序
         // 小程序
         MiniProgramVo miniProgramVo = MiniProgramVo.builder()
         MiniProgramVo miniProgramVo = MiniProgramVo.builder()
                 .desc(content.getMiniprogramTitle())
                 .desc(content.getMiniprogramTitle())
@@ -53,7 +73,7 @@ public class IpadSendServer {
                 .imgUrl(content.getMiniprogramPicUrl())
                 .imgUrl(content.getMiniprogramPicUrl())
                 .username(courseMaConfig.getOriginalId() + "@app")
                 .username(courseMaConfig.getOriginalId() + "@app")
                 .pagepath(content.getMiniprogramPage())
                 .pagepath(content.getMiniprogramPage())
-                .appid(content.getMiniprogramAppid())
+                .appid(courseMaConfig.getAppid())
                 .build();
                 .build();
         miniProgramVo.setBase(vo);
         miniProgramVo.setBase(vo);
         WxWorkResponseDTO<WxWorkSendAppMsgRespDTO> resp = ipadSendUtils.sendMiniProgram(miniProgramVo);
         WxWorkResponseDTO<WxWorkSendAppMsgRespDTO> resp = ipadSendUtils.sendMiniProgram(miniProgramVo);
@@ -337,7 +357,7 @@ public class IpadSendServer {
                     break;
                     break;
                 case "4":
                 case "4":
                 case "10":
                 case "10":
-                    sendMiniProgram(vo, content, miniMap);
+                    sendMiniProgram(vo, content, miniMap, qwUser.getCompanyId());
                     break;
                     break;
                 case "5":
                 case "5":
                     // 文件
                     // 文件

+ 1 - 0
fs-ipad-task/src/main/java/com/fs/app/task/SendMsg.java

@@ -92,6 +92,7 @@ public class SendMsg {
 
 
     private Map<String, FsCoursePlaySourceConfig> getMiniMap() {
     private Map<String, FsCoursePlaySourceConfig> getMiniMap() {
         List<FsCoursePlaySourceConfig> list = fsCoursePlaySourceConfigService.list(new QueryWrapper<FsCoursePlaySourceConfig>().ne("type", 2).eq("is_del", 0));
         List<FsCoursePlaySourceConfig> list = fsCoursePlaySourceConfigService.list(new QueryWrapper<FsCoursePlaySourceConfig>().ne("type", 2).eq("is_del", 0));
+        log.info("获取到的小程序配置:{}", JSON.toJSONString(list));
 //        SysConfig maConfig = sysConfigMapper.selectConfigByConfigKey("courseMa.config");
 //        SysConfig maConfig = sysConfigMapper.selectConfigByConfigKey("courseMa.config");
 //        List<CourseMaConfig> courseMaConfigs = JSON.parseArray(maConfig.getConfigValue(), CourseMaConfig.class);
 //        List<CourseMaConfig> courseMaConfigs = JSON.parseArray(maConfig.getConfigValue(), CourseMaConfig.class);
         return PubFun.listToMapByGroupObject(list, FsCoursePlaySourceConfig::getAppid);
         return PubFun.listToMapByGroupObject(list, FsCoursePlaySourceConfig::getAppid);

+ 16 - 9
fs-qw-task/src/main/java/com/fs/app/taskService/impl/SopLogsTaskServiceImpl.java

@@ -363,7 +363,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
 
 
 
 
     private void processSopGroup(String sopId, List<SopUserLogsVo> userLogsVos,LocalDateTime currentTime, Map<String,
     private void processSopGroup(String sopId, List<SopUserLogsVo> userLogsVos,LocalDateTime currentTime, Map<String,
-            QwGroupChat> groupChatMap,CourseConfig config,Map<Long, Map<Integer, List<CompanyMiniapp>>> miniMap,
+                                         QwGroupChat> groupChatMap,CourseConfig config,Map<Long, Map<Integer, List<CompanyMiniapp>>> miniMap,
                                  List<Company> companies) throws Exception {
                                  List<Company> companies) throws Exception {
         QwSopRuleTimeVO ruleTimeVO = sopMapper.selectQwSopByClickHouseId(sopId);
         QwSopRuleTimeVO ruleTimeVO = sopMapper.selectQwSopByClickHouseId(sopId);
 
 
@@ -857,7 +857,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                                      SopUserLogsVo logVo, Date sendTime, Long courseId, Long videoId, String qwUserId, String companyUserId,
                                      SopUserLogsVo logVo, Date sendTime, Long courseId, Long videoId, String qwUserId, String companyUserId,
                                      String companyId, String externalId, String welcomeText, String qwUserName,
                                      String companyId, String externalId, String welcomeText, String qwUserName,
                                      Long fsUserId, boolean isGroupChat, String miniAppId, QwGroupChat groupChat,CourseConfig config,Map<Long,
                                      Long fsUserId, boolean isGroupChat, String miniAppId, QwGroupChat groupChat,CourseConfig config,Map<Long,
-                                     Map<Integer, List<CompanyMiniapp>>> miniMap,Integer grade, Integer sendMsgType,
+                    Map<Integer, List<CompanyMiniapp>>> miniMap,Integer grade, Integer sendMsgType,
                                      List<Company> companies) {
                                      List<Company> companies) {
         // 深拷贝 Content 对象,避免使用 JSON
         // 深拷贝 Content 对象,避免使用 JSON
         QwSopTempSetting.Content clonedContent = deepCopyContent(content);
         QwSopTempSetting.Content clonedContent = deepCopyContent(content);
@@ -953,6 +953,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                     if(sopLogs.getSendType()==1){
                     if(sopLogs.getSendType()==1){
                         setting.setMiniprogramAppid(miniAppId);
                         setting.setMiniprogramAppid(miniAppId);
                     }else {
                     }else {
+                        int miniType = getLevel(grade);
                         //算主备小程序
                         //算主备小程序
                         String finalAppId = getAppIdFromMiniMap(miniMap, companyId, sendMsgType, grade);
                         String finalAppId = getAppIdFromMiniMap(miniMap, companyId, sendMsgType, grade);
 
 
@@ -960,6 +961,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                             finalAppId = miniAppId;
                             finalAppId = miniAppId;
                         }
                         }
 
 
+                        setting.setMiniType(miniType);
                         if (!StringUtil.strIsNullOrEmpty(finalAppId)) {
                         if (!StringUtil.strIsNullOrEmpty(finalAppId)) {
                             setting.setMiniprogramAppid(finalAppId);
                             setting.setMiniprogramAppid(finalAppId);
                         } else {
                         } else {
@@ -1032,8 +1034,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
             return null;
             return null;
         }
         }
 
 
-        int effectiveGrade = (grade == null) ? 5 : grade;
-        int listIndex = (effectiveGrade == 1 || effectiveGrade == 2) ? 0 : 1;
+        int listIndex = getLevel(grade);
         List<CompanyMiniapp> miniapps = gradeMap.get(listIndex);
         List<CompanyMiniapp> miniapps = gradeMap.get(listIndex);
 
 
         if (miniapps == null || miniapps.isEmpty()) {
         if (miniapps == null || miniapps.isEmpty()) {
@@ -1046,6 +1047,12 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
                 : null;
                 : null;
     }
     }
 
 
+    private static int getLevel(Integer grade) {
+        int effectiveGrade = (grade == null) ? 5 : grade;
+        int listIndex = (effectiveGrade == 1 || effectiveGrade == 2) ? 0 : 1;
+        return listIndex;
+    }
+
     /**
     /**
      * 深拷贝 Content 对象,避免使用 JSON 进行序列化和反序列化
      * 深拷贝 Content 对象,避免使用 JSON 进行序列化和反序列化
      */
      */
@@ -1209,9 +1216,9 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
 
 
 
 
     public FsCourseSopAppLink createFsCourseSopAppLink(String link, Date sendTime, Date updateTime, String companyId,
     public FsCourseSopAppLink createFsCourseSopAppLink(String link, Date sendTime, Date updateTime, String companyId,
-                                         String companyUserId,String qwUserId,String qwUserName,String corpId,
-                                         Long courseId,String linkTile,String linkImageUrl,Long videoId,
-                                         String linkDescribe,String appMsgLink,String externalId){
+                                                       String companyUserId,String qwUserId,String qwUserName,String corpId,
+                                                       Long courseId,String linkTile,String linkImageUrl,Long videoId,
+                                                       String linkDescribe,String appMsgLink,String externalId){
 
 
         FsCourseSopAppLink sopAppLink=new FsCourseSopAppLink();
         FsCourseSopAppLink sopAppLink=new FsCourseSopAppLink();
         sopAppLink.setLink(link);
         sopAppLink.setLink(link);
@@ -1275,8 +1282,8 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
     }
     }
 
 
     private String createLinkByMiniApp(QwSopTempSetting.Content.Setting setting, SopUserLogsVo logVo, Date sendTime,
     private String createLinkByMiniApp(QwSopTempSetting.Content.Setting setting, SopUserLogsVo logVo, Date sendTime,
-                                     Long courseId, Long videoId, String qwUserId,
-                                     String companyUserId, String companyId, String externalId,String isOfficial,Long fsUserId) {
+                                       Long courseId, Long videoId, String qwUserId,
+                                       String companyUserId, String companyId, String externalId,String isOfficial,Long fsUserId) {
         // 获取缓存的配置
         // 获取缓存的配置
         CourseConfig config;
         CourseConfig config;
         synchronized(configLock) {
         synchronized(configLock) {

+ 0 - 1
fs-service/src/main/java/com/fs/company/vo/CompanyVO.java

@@ -91,7 +91,6 @@ public class CompanyVO implements Serializable
     private String restartTime;
     private String restartTime;
     private List<String> miniAppMaster;
     private List<String> miniAppMaster;
     private List<String> miniAppServer;
     private List<String> miniAppServer;
-    private Integer maxPadNum;
     /** 已占用 */
     /** 已占用 */
     private Integer usedNum;
     private Integer usedNum;
     /** 所属部门id */
     /** 所属部门id */

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

@@ -309,37 +309,5 @@ public class FsStoreProductScrm extends BaseEntity
 
 
     @Excel(name = "是否药品")
     @Excel(name = "是否药品")
     private String isDrug;
     private String isDrug;
-    @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;
-    @Excel(name = "审核状态")
-    private String isAudit;
 
 
 }
 }

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

@@ -267,39 +267,4 @@ public class FsStoreProductAddEditParam implements Serializable
         // 指定企业
         // 指定企业
     private String companyIds;
     private String companyIds;
 
 
-    private Long storeId;
-
-    /*isDrug: "0", // 是否药品
-        drugImage: null, // 药品展示图
-        drugRegCertNo: null, // 药品注册证书编号
-        commonName: null, // 通用名称
-        dosageForm: null, // 剂型
-        unitPrice: null, // 单价
-        batchNumber: null, // 批号
-        mah: null, // 上市许可持有人
-        mahAddress: null, // 上市许可持有人地址
-        manufacturer: null, // 生产企业
-        manufacturerAddress: null, // 生产企业地址
-        indications: null, // 功能主治
-        dosage: null, // 用法用量
-        adverseReactions: null, // 不良反应
-        contraindications: null, // 禁忌
-        precautions: null // 注意事项*/
-    private String isDrug;
-    private String drugImage;
-    private String drugRegCertNo;
-    private String commonName;
-    private String dosageForm;
-    private String unitPrice;
-    private String batchNumber;
-    private String mah;
-    private String mahAddress;
-    private String manufacturer;
-    private String manufacturerAddress;
-    private String indications;
-    private String dosage;
-    private String adverseReactions;
-    private String contraindications;
-    private String precautions;
-
 }
 }

+ 2 - 2
fs-service/src/main/java/com/fs/hisStore/service/IFsStoreProductScrmService.java

@@ -77,7 +77,7 @@ public interface IFsStoreProductScrmService
 
 
     List<FsStoreProductListVO> selectFsStoreProductBarCodeListVO(FsStoreProductScrm fsStoreProduct);
     List<FsStoreProductListVO> selectFsStoreProductBarCodeListVO(FsStoreProductScrm fsStoreProduct);
 
 
-    Map<String,Object> getFormatAttr(Long productId, String jsonStr);
+    Map<String,Object> getFormatAttr(Long productId, String jsonStr,Long[] stores);
 
 
 
 
     R addOrEdit(FsStoreProductAddEditParam fsStoreProduct);
     R addOrEdit(FsStoreProductAddEditParam fsStoreProduct);
@@ -87,7 +87,7 @@ public interface IFsStoreProductScrmService
 
 
     List<FsStoreProductListQueryVO> selectFsStoreProductListQuery(FsStoreProductQueryParam param);
     List<FsStoreProductListQueryVO> selectFsStoreProductListQuery(FsStoreProductQueryParam param);
 
 
-    FsStoreProductQueryVO selectFsStoreProductByIdQuery(Long productId);
+    FsStoreProductQueryVO selectFsStoreProductByIdQuery(Long productId,String storeId);
 
 
     void decProductStock(Long productId, Long productAttrValueId, Integer cartNum);
     void decProductStock(Long productId, Long productAttrValueId, Integer cartNum);
 
 

+ 9 - 0
fs-service/src/main/java/com/fs/hisStore/vo/FsStoreScrmVO.java

@@ -0,0 +1,9 @@
+package com.fs.hisStore.vo;
+
+import lombok.Data;
+
+@Data
+public class FsStoreScrmVO {
+    private String storeId;
+    private String storeName;
+}

+ 1 - 0
fs-service/src/main/java/com/fs/qw/vo/QwSopCourseFinishTempSetting.java

@@ -68,6 +68,7 @@ public class QwSopCourseFinishTempSetting implements Serializable,Cloneable{
 
 
         /** 小程序appid */
         /** 小程序appid */
         private String miniprogramAppid;
         private String miniprogramAppid;
+        private Integer miniType;
 
 
         /** 小程序消息标题 */
         /** 小程序消息标题 */
         private String miniprogramTitle;
         private String miniprogramTitle;

+ 1 - 0
fs-service/src/main/java/com/fs/qw/vo/QwSopTempSetting.java

@@ -100,6 +100,7 @@ public class QwSopTempSetting implements Serializable{
 
 
             /** 小程序appid */
             /** 小程序appid */
             private String miniprogramAppid;
             private String miniprogramAppid;
+            private Integer miniType;
 
 
             /** 小程序消息标题 */
             /** 小程序消息标题 */
             private String miniprogramTitle;
             private String miniprogramTitle;

+ 6 - 6
fs-service/src/main/java/com/fs/sop/service/impl/SopUserLogsInfoServiceImpl.java

@@ -860,11 +860,11 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
 
 
                             String miniAppId = null;
                             String miniAppId = null;
 
 
+                            int effectiveGrade = (item.getGrade() == null) ? 5 : item.getGrade();
+                            int listIndex = (effectiveGrade == 1 || effectiveGrade == 2) ? 0 : 1;
                             if (!miniMap.isEmpty() && qwUser.getSendMsgType() == 1) {
                             if (!miniMap.isEmpty() && qwUser.getSendMsgType() == 1) {
                                 Map<Integer, List<CompanyMiniapp>> integerListMap = miniMap.get(Long.valueOf(companyId));
                                 Map<Integer, List<CompanyMiniapp>> integerListMap = miniMap.get(Long.valueOf(companyId));
                                 if (integerListMap != null) {
                                 if (integerListMap != null) {
-                                    int effectiveGrade = (item.getGrade() == null) ? 5 : item.getGrade();
-                                    int listIndex = (effectiveGrade == 1 || effectiveGrade == 2) ? 0 : 1;
                                     List<CompanyMiniapp> miniapps = integerListMap.get(listIndex);
                                     List<CompanyMiniapp> miniapps = integerListMap.get(listIndex);
 
 
                                     if (miniapps != null && !miniapps.isEmpty()) {
                                     if (miniapps != null && !miniapps.isEmpty()) {
@@ -879,7 +879,7 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
                             if (StringUtil.strIsNullOrEmpty(miniAppId) && !StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())) {
                             if (StringUtil.strIsNullOrEmpty(miniAppId) && !StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())) {
                                 miniAppId = qwCompany.getMiniAppId();
                                 miniAppId = qwCompany.getMiniAppId();
                             }
                             }
-
+                            st.setMiniType(listIndex);
                             if (!StringUtil.strIsNullOrEmpty(miniAppId)) {
                             if (!StringUtil.strIsNullOrEmpty(miniAppId)) {
                                 st.setMiniprogramAppid(miniAppId);
                                 st.setMiniprogramAppid(miniAppId);
                             } else {
                             } else {
@@ -1272,11 +1272,11 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
 
 
                     String miniAppId = null;
                     String miniAppId = null;
 
 
+                    int effectiveGrade = (item.getGrade() == null) ? 5 : item.getGrade();
+                    int listIndex = (effectiveGrade == 1 || effectiveGrade == 2) ? 0 : 1;
                     if (!miniMap.isEmpty() && qwUser.getSendMsgType() == 1) {
                     if (!miniMap.isEmpty() && qwUser.getSendMsgType() == 1) {
                         Map<Integer, List<CompanyMiniapp>> integerListMap = miniMap.get(Long.valueOf(companyId));
                         Map<Integer, List<CompanyMiniapp>> integerListMap = miniMap.get(Long.valueOf(companyId));
                         if (integerListMap != null) {
                         if (integerListMap != null) {
-                            int effectiveGrade = (item.getGrade() == null) ? 5 : item.getGrade();
-                            int listIndex = (effectiveGrade == 1 || effectiveGrade == 2) ? 0 : 1;
                             List<CompanyMiniapp> miniapps = integerListMap.get(listIndex);
                             List<CompanyMiniapp> miniapps = integerListMap.get(listIndex);
 
 
                             if (miniapps != null && !miniapps.isEmpty()) {
                             if (miniapps != null && !miniapps.isEmpty()) {
@@ -1291,7 +1291,7 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
                     if (StringUtil.strIsNullOrEmpty(miniAppId) && !StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())) {
                     if (StringUtil.strIsNullOrEmpty(miniAppId) && !StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())) {
                         miniAppId = qwCompany.getMiniAppId();
                         miniAppId = qwCompany.getMiniAppId();
                     }
                     }
-
+                    st.setMiniType(listIndex);
                     if (!StringUtil.strIsNullOrEmpty(miniAppId)) {
                     if (!StringUtil.strIsNullOrEmpty(miniAppId)) {
                         st.setMiniprogramAppid(miniAppId);
                         st.setMiniprogramAppid(miniAppId);
                     } else {
                     } else {

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

@@ -149,9 +149,9 @@ public TableDataInfo list(FsStoreProductScrm fsStoreProduct)
 
 
     @ApiOperation(value = "生成属性")
     @ApiOperation(value = "生成属性")
     @PostMapping(value = "/genFormatAttr/{productId}")
     @PostMapping(value = "/genFormatAttr/{productId}")
-    public ResponseEntity genFormatAttr(@PathVariable Long productId, @RequestBody String jsonStr){
+    public ResponseEntity genFormatAttr(@PathVariable Long productId, @RequestBody String jsonStr,Long[] stores){
 
 
-        return new ResponseEntity<>(fsStoreProductService.getFormatAttr(productId,jsonStr), HttpStatus.OK);
+        return new ResponseEntity<>(fsStoreProductService.getFormatAttr(productId,jsonStr, stores), HttpStatus.OK);
     }
     }
     /**
     /**
      * 获取商品详细信息
      * 获取商品详细信息

+ 23 - 23
fs-user-app/src/main/java/com/fs/app/controller/store/HuifuPayScrmController.java

@@ -43,29 +43,29 @@ public class HuifuPayScrmController {
         logger.info("汇付支付回调:"+huiFuResult);
         logger.info("汇付支付回调:"+huiFuResult);
         if(huiFuResult.getResp_code().equals("00000000") && huiFuResult.getNotify_type().equals("1")){
         if(huiFuResult.getResp_code().equals("00000000") && huiFuResult.getNotify_type().equals("1")){
             String[] orderId=huiFuResult.getReq_seq_id().split("-");
             String[] orderId=huiFuResult.getReq_seq_id().split("-");
-            switch (orderId[0]){
-                case "inquiry":
-                    inquiryOrderService.payConfirm("",orderId[1],huiFuResult.getHf_seq_id(),"",1);
-                    break;
-                case "store":
-                    storeOrderService.payConfirm(1,null,orderId[1],huiFuResult.getHf_seq_id(),null,null);
-                    break;
-                case "package":
-                    packageOrderService.payConfirm("",orderId[1],huiFuResult.getHf_seq_id(),"",1);
-                    break;
-                case "course":
-                    courseOrderService.payConfirm("",orderId[1],huiFuResult.getHf_seq_id(),"",1);
-                    break;
-                case "appvip":
-                    vipOrderService.payConfirm("",orderId[1],huiFuResult.getHf_seq_id(),"",1);
-                    break;
-                case "integral":
-                    integralOrderService.payConfirm("",orderId[1],huiFuResult.getHf_seq_id(),"",1);
-                    break;
-                case "product":
-                    courseProductOrderService.payConfirm("",orderId[1],huiFuResult.getHf_seq_id(),"",1);
-                    break;
-            }
+//            switch (orderId[0]){
+//                case "inquiry":
+//                    inquiryOrderService.payConfirm("",orderId[1],huiFuResult.getHf_seq_id(),"",1);
+//                    break;
+//                case "store":
+//                    storeOrderService.payConfirm(1,null,orderId[1],huiFuResult.getHf_seq_id(),null,null);
+//                    break;
+//                case "package":
+//                    packageOrderService.payConfirm("",orderId[1],huiFuResult.getHf_seq_id(),"",1);
+//                    break;
+//                case "course":
+//                    courseOrderService.payConfirm("",orderId[1],huiFuResult.getHf_seq_id(),"",1);
+//                    break;
+//                case "appvip":
+//                    vipOrderService.payConfirm("",orderId[1],huiFuResult.getHf_seq_id(),"",1);
+//                    break;
+//                case "integral":
+//                    integralOrderService.payConfirm("",orderId[1],huiFuResult.getHf_seq_id(),"",1);
+//                    break;
+//                case "product":
+//                    courseProductOrderService.payConfirm("",orderId[1],huiFuResult.getHf_seq_id(),"",1);
+//                    break;
+//            }
         }
         }
 
 
         return "ok";
         return "ok";

+ 4 - 6
fs-user-app/src/main/java/com/fs/app/controller/store/ProductScrmController.java

@@ -5,11 +5,9 @@ import com.fs.app.annotation.Login;
 import com.fs.app.controller.AppBaseController;
 import com.fs.app.controller.AppBaseController;
 import com.fs.common.core.domain.R;
 import com.fs.common.core.domain.R;
 import com.fs.common.param.BaseQueryParam;
 import com.fs.common.param.BaseQueryParam;
+import com.fs.common.utils.StringUtils;
 import com.fs.erp.service.IErpGoodsService;
 import com.fs.erp.service.IErpGoodsService;
-import com.fs.hisStore.domain.FsStoreProductAttrScrm;
-import com.fs.hisStore.domain.FsStoreProductAttrValueScrm;
-import com.fs.hisStore.domain.FsStoreProductCategoryScrm;
-import com.fs.hisStore.domain.FsStoreProductRelationScrm;
+import com.fs.hisStore.domain.*;
 import com.fs.hisStore.param.*;
 import com.fs.hisStore.param.*;
 import com.fs.hisStore.service.*;
 import com.fs.hisStore.service.*;
 import com.fs.hisStore.vo.FsStoreCartVO;
 import com.fs.hisStore.vo.FsStoreCartVO;
@@ -101,8 +99,8 @@ public class ProductScrmController extends AppBaseController {
     }
     }
     @ApiOperation("获取商品详情")
     @ApiOperation("获取商品详情")
     @GetMapping("/getProductDetails")
     @GetMapping("/getProductDetails")
-    public R getProductDetails(@RequestParam(value="productId") Long productId){
-        FsStoreProductQueryVO product=productService.selectFsStoreProductByIdQuery(productId);
+    public R getProductDetails(@RequestParam(value="productId") Long productId,String storeId){
+        FsStoreProductQueryVO product=productService.selectFsStoreProductByIdQuery(productId, storeId);
         if(product==null){
         if(product==null){
             return R.error("商品不存在或已下架");
             return R.error("商品不存在或已下架");
         }
         }