Forráskód Böngészése

下单,退单及erp调试

ct 3 napja
szülő
commit
74377269a2
18 módosított fájl, 184 hozzáadás és 64 törlés
  1. 10 9
      fs-service/src/main/java/com/fs/core/utils/OrderCodeUtils.java
  2. 25 11
      fs-service/src/main/java/com/fs/hisStore/domain/FsPatientScrm.java
  3. 23 12
      fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductCategoryScrm.java
  4. 14 4
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductCategoryScrmMapper.java
  5. 4 1
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java
  6. 2 0
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreScrmMapper.java
  7. 2 0
      fs-service/src/main/java/com/fs/hisStore/param/FsStoreProductQueryParam.java
  8. 2 2
      fs-service/src/main/java/com/fs/hisStore/service/IFsStoreProductCategoryScrmService.java
  9. 4 4
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductCategoryScrmServiceImpl.java
  10. 9 2
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreScrmServiceImpl.java
  11. 2 1
      fs-service/src/main/resources/mapper/hisStore/FsPatientScrmMapper.xml
  12. 11 7
      fs-service/src/main/resources/mapper/hisStore/FsStoreProductCategoryScrmMapper.xml
  13. 19 0
      fs-service/src/main/resources/mapper/hisStore/FsStoreScrmMapper.xml
  14. 25 4
      fs-store/src/main/java/com/fs/hisStore/controller/store/FsStoreProductCategoryScrmController.java
  15. 1 1
      fs-store/src/main/resources/application.yml
  16. 5 1
      fs-user-app/src/main/java/com/fs/app/controller/store/CommonScrmController.java
  17. 5 3
      fs-user-app/src/main/java/com/fs/app/controller/store/ProductScrmController.java
  18. 21 2
      fs-user-app/src/main/java/com/fs/app/controller/store/StoreAfterSalesScrmController.java

+ 10 - 9
fs-service/src/main/java/com/fs/core/utils/OrderCodeUtils.java

@@ -44,15 +44,16 @@ public class OrderCodeUtils {
 
     }
     public static String getOrderSn(){
-        String url= FSConfig.getCommonApi()+ "/app/common/genOrderCode";
-//        String url= "42.194.245.189:8010/app/common/genOrderCode";
-        String json = HttpRequest.get(url)
-                .execute().body();
-        OrderCodeVO vo= JSONUtil.toBean(json, OrderCodeVO.class);
-        if(vo.getCode()==200){
-            return vo.getOrderCode();
-        }
-        else return null;
+//        String url= FSConfig.getCommonApi()+ "/app/common/genOrderCode";
+////        String url= "42.194.245.189:8010/app/common/genOrderCode";
+//        String json = HttpRequest.get(url)
+//                .execute().body();
+//        OrderCodeVO vo= JSONUtil.toBean(json, OrderCodeVO.class);
+//        if(vo.getCode()==200){
+//            return vo.getOrderCode();
+//        }
+//        else return null;
+        return OrderCodeUtils.genOrderSn();
 
     }
 

+ 25 - 11
fs-service/src/main/java/com/fs/hisStore/domain/FsPatientScrm.java

@@ -54,10 +54,23 @@ public class FsPatientScrm extends BaseEntity
     @Excel(name = "是否删除 ")
     private Integer isDel;
 
+//    /** 病人关系 1自己 2父母 3子女 4爱人 5其他 */
+//    @Excel(name = "病人关系 1自己 2父母 3子女 4爱人 5其他")
+//    @TableField("relation")
+//    private Integer patientRelation;
+
+    public String getRelation() {
+        return relation;
+    }
+
+    public void setRelation(String relation) {
+        this.relation = relation;
+    }
+
     /** 病人关系 1自己 2父母 3子女 4爱人 5其他 */
     @Excel(name = "病人关系 1自己 2父母 3子女 4爱人 5其他")
     @TableField("relation")
-    private Integer patientRelation;
+    private String relation;
 
     public void setPatientId(Long patientId)
     {
@@ -131,15 +144,15 @@ public class FsPatientScrm extends BaseEntity
     {
         return isDel;
     }
-    public void setPatientRelation(Integer patientRelation)
-    {
-        this.patientRelation = patientRelation;
-    }
-
-    public Integer getPatientRelation()
-    {
-        return patientRelation;
-    }
+//    public void setPatientRelation(Integer patientRelation)
+//    {
+//        this.patientRelation = patientRelation;
+//    }
+//
+//    public Integer getPatientRelation()
+//    {
+//        return patientRelation;
+//    }
 
     @Override
     public String toString() {
@@ -152,7 +165,8 @@ public class FsPatientScrm extends BaseEntity
             .append("gender", getGender())
             .append("status", getStatus())
             .append("isDel", getIsDel())
-            .append("patientRelation", getPatientRelation())
+//            .append("patientRelation", getPatientRelation())
+            .append("relation", getRelation())
             .toString();
     }
 }

+ 23 - 12
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreProductCategoryScrm.java

@@ -5,7 +5,7 @@ import com.fs.common.core.domain.BaseEntity;
 
 /**
  * 商品分类对象 fs_store_product_category
- * 
+ *
  * @author fs
  * @date 2022-03-15
  */
@@ -40,12 +40,23 @@ public class FsStoreProductCategoryScrm extends BaseEntity
     @Excel(name = "删除状态")
     private Integer isDel;
 
-    public void setCateId(Long cateId) 
+    public Long getStoreId() {
+        return storeId;
+    }
+
+    public void setStoreId(Long storeId) {
+        this.storeId = storeId;
+    }
+
+    @Excel(name = "关联店铺id(没有关联则为默认店铺)")
+    private Long storeId;
+
+    public void setCateId(Long cateId)
     {
         this.cateId = cateId;
     }
 
-    public Long getCateId() 
+    public Long getCateId()
     {
         return cateId;
     }
@@ -63,43 +74,43 @@ public class FsStoreProductCategoryScrm extends BaseEntity
         this.cateName = cateName;
     }
 
-    public String getCateName() 
+    public String getCateName()
     {
         return cateName;
     }
-    public void setSort(Long sort) 
+    public void setSort(Long sort)
     {
         this.sort = sort;
     }
 
-    public Long getSort() 
+    public Long getSort()
     {
         return sort;
     }
-    public void setPic(String pic) 
+    public void setPic(String pic)
     {
         this.pic = pic;
     }
 
-    public String getPic() 
+    public String getPic()
     {
         return pic;
     }
-    public void setIsShow(Integer isShow) 
+    public void setIsShow(Integer isShow)
     {
         this.isShow = isShow;
     }
 
-    public Integer getIsShow() 
+    public Integer getIsShow()
     {
         return isShow;
     }
-    public void setIsDel(Integer isDel) 
+    public void setIsDel(Integer isDel)
     {
         this.isDel = isDel;
     }
 
-    public Integer getIsDel() 
+    public Integer getIsDel()
     {
         return isDel;
     }

+ 14 - 4
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductCategoryScrmMapper.java

@@ -76,15 +76,24 @@ public interface FsStoreProductCategoryScrmMapper
             "<if test = 'maps.pid != null    '> " +
             "and c.pid =#{maps.pid} " +
             "</if>" +
+            "<if test = 'maps.storeId != null    '> " +
+            "and c.store_id =#{maps.storeId} " +
+            "</if>" +
             " order by c.sort asc "+
             "</script>"})
     List<FsStoreProductCategoryScrm> selectFsStoreProductCategoryListQuery(@Param("maps") FsStoreProductCategoryScrm param);
 
-    @Select("select * from fs_store_product_category_scrm where pid=0")
-    List<FsStoreProductCategoryScrm> getPid();
+    @Select({"<script> " +
+            "select * from fs_store_product_category_scrm where pid=0 and is_del = 0 " +
+                    "<if test=\"storeId != null \"> and store_id = #{storeId}</if>\n" +
+            "</script>"})
+    List<FsStoreProductCategoryScrm> getPid(@Param("storeId")Long storeId);
 
-    @Select("select * from fs_store_product_category_scrm ")
-    List<FsStoreProductCategorysVO> selectFsStoreProductCategorysVOList();
+    @Select({"<script> " +
+            "select * from fs_store_product_category_scrm where is_del = 0"+
+            "<if test=\"storeId != null \"> and store_id = #{storeId}</if>\n" +
+            "</script>"})
+    List<FsStoreProductCategorysVO> selectFsStoreProductCategorysVOList(@Param("storeId")Long storeId);
 
     @Select({"<script> " +
             "SELECT f1.*,f2.cate_name pname FROM fs_store_product_category_scrm f1 LEFT JOIN fs_store_product_category_scrm f2 on f1.pid=f2.cate_id \n" +
@@ -95,6 +104,7 @@ public interface FsStoreProductCategoryScrmMapper
             "            <if test=\"pic != null  and pic != ''\"> f1.and pic = #{pic}</if>\n" +
             "            <if test=\"isShow != null \"> and f1.is_show = #{isShow}</if>\n" +
             "            <if test=\"isDel != null  and isDel != ''\"> and f1.is_del = #{isDel}</if>\n" +
+            "            <if test=\"storeId != null\"> and f1.store_id = #{storeId}</if>\n" +
             "       order by f1.sort,f1.cate_id desc"+
             "</script>"})
     List<FsStoreProductCategoryVO> selectFsStoreProductCategoryListVO(FsStoreProductCategoryScrm fsStoreProductCategory);

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

@@ -91,7 +91,7 @@ public interface FsStoreProductScrmMapper
             "and find_in_set(#{maps.companyIds}, p.company_ids) " +
             "</if>"+
             "<if test = 'maps.storeId != null and maps.storeId != \"\" '> " +
-            "and store_id = #{maps.storeId} " +
+            "and p.store_id = #{maps.storeId} " +
             "</if>"+
             "<if test = 'maps.storeIds != null '>" +
             "and store_id in " +
@@ -194,6 +194,9 @@ public interface FsStoreProductScrmMapper
             "<if test = 'maps.cateId != null    '> " +
             "and p.cate_id =#{maps.cateId}  " +
             "</if>" +
+            "<if test = 'maps.storeId != null'> " +
+            "and p.store_id = #{maps.storeId}" +
+            "</if>" +
             "<if test = 'maps.defaultOrder != null and maps.defaultOrder==\"desc\"  '> " +
             "order by p.sort desc,product_id desc" +
             "</if>" +

+ 2 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreScrmMapper.java

@@ -81,4 +81,6 @@ public interface FsStoreScrmMapper
     List<FsStoreRecommendListVO> storeRecommendList();
 
     List<FsStoreScrm> selectFsStoreByStoreIds(String[] storeId);
+
+    List<FsStoreScrm> selectFsStoreListByProduct(FsStoreScrm fsStoreScrm);
 }

+ 2 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreProductQueryParam.java

@@ -30,4 +30,6 @@ public class FsStoreProductQueryParam extends BaseQueryParam implements Serializ
     private Long companyId;
     //是否药品(0否 1是)
     private Integer isDrug;
+    //店铺id
+    private Long storeId;
 }

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

@@ -75,7 +75,7 @@ public interface IFsStoreProductCategoryScrmService
 
     int deleteFsStoreProductCategoryByCateIds(Long[] cateIds);
 
-    List<FsStoreProductCategorysVO> selectFsStoreProductCategorysVOList();
+    List<FsStoreProductCategorysVO> selectFsStoreProductCategorysVOList(Long storeId);
 
-    List<FsStoreProductCategoryVO> getPidList();
+    List<FsStoreProductCategoryVO> getPidList(Long storeId);
 }

+ 4 - 4
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductCategoryScrmServiceImpl.java

@@ -155,8 +155,8 @@ public class FsStoreProductCategoryScrmServiceImpl implements IFsStoreProductCat
     }
 
     @Override
-    public List<FsStoreProductCategorysVO> selectFsStoreProductCategorysVOList() {
-        List<FsStoreProductCategorysVO> fsStoreProductCategories = fsStoreProductCategoryMapper.selectFsStoreProductCategorysVOList();
+    public List<FsStoreProductCategorysVO> selectFsStoreProductCategorysVOList(Long storeId) {
+        List<FsStoreProductCategorysVO> fsStoreProductCategories = fsStoreProductCategoryMapper.selectFsStoreProductCategorysVOList(storeId);
 
         ArrayList<FsStoreProductCategorysVO> v = new ArrayList<>();
         for (FsStoreProductCategorysVO fsStoreProductCategorysVo : fsStoreProductCategories) {
@@ -178,9 +178,9 @@ public class FsStoreProductCategoryScrmServiceImpl implements IFsStoreProductCat
     }
 
     @Override
-    public List<FsStoreProductCategoryVO> getPidList() {
+    public List<FsStoreProductCategoryVO> getPidList(Long storeId) {
         FsStoreProductCategoryVO vo = new FsStoreProductCategoryVO();
-        List<FsStoreProductCategoryScrm> pid = fsStoreProductCategoryMapper.getPid();
+        List<FsStoreProductCategoryScrm> pid = fsStoreProductCategoryMapper.getPid(storeId);
         vo.setCateName("顶级目录");
         vo.setCateId(0L);
         vo.setChildren(pid);

+ 9 - 2
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreScrmServiceImpl.java

@@ -4,8 +4,10 @@ import com.fs.common.exception.CustomException;
 import com.fs.common.utils.DateUtils;
 import com.fs.his.param.FsStoreAuditParam;
 import com.fs.his.utils.StoreMD5PasswordEncoder;
+import com.fs.hisStore.domain.FsStoreProductCategoryScrm;
 import com.fs.hisStore.domain.FsStoreProductScrm;
 import com.fs.hisStore.domain.FsStoreScrm;
+import com.fs.hisStore.mapper.FsStoreProductCategoryScrmMapper;
 import com.fs.hisStore.mapper.FsStoreProductScrmMapper;
 import com.fs.hisStore.mapper.FsStoreScrmMapper;
 import com.fs.hisStore.service.IFsHisStoreAuditLogScrmService;
@@ -190,7 +192,8 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
         FsStoreScrm fsStoreScrm = new FsStoreScrm();
         fsStoreScrm.setStatus(1);//启用
         fsStoreScrm.setIsAudit(1);//审核通过
-        List<FsStoreScrm>  storeList =  fsStoreMapper.selectFsStoreList( fsStoreScrm);
+//        List<FsStoreScrm>  storeList =  fsStoreMapper.selectFsStoreList(fsStoreScrm);
+        List<FsStoreScrm>  storeList =  fsStoreMapper.selectFsStoreListByProduct(fsStoreScrm); //查询有商品的列表
         return storeList.stream().map(store -> {
             FsStoreProductScrm fsStoreProductScrm = new FsStoreProductScrm();
             fsStoreProductScrm.setStoreId(store.getStoreId());
@@ -199,7 +202,11 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
             fsStoreProductScrm.setIsShow(1);//上架
             fsStoreProductScrm.setIsDel(0);
             List<FsStoreProductScrm> fsStoreProductScrms = fsStoreProduct.selectFsStoreProductList(fsStoreProductScrm);
-            return FsStoreRecommendListVO.builder().store(store).recommendProductList(fsStoreProductScrms).build();
+            if (fsStoreProductScrms != null && !fsStoreProductScrms.isEmpty()) {
+                return FsStoreRecommendListVO.builder().store(store).recommendProductList(fsStoreProductScrms).build();
+            } else {
+                return null;
+            }
         }).collect(Collectors.toList());
     }
 

+ 2 - 1
fs-service/src/main/resources/mapper/hisStore/FsPatientScrmMapper.xml

@@ -13,7 +13,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="gender"    column="sex"    />
         <result property="status"    column="status"    />
         <result property="isDel"    column="is_del"    />
-        <result property="patientRelation"    column="relation"    />
+<!--        <result property="patientRelation"    column="relation"    />-->
+        <result property="relation"    column="relation"    />
     </resultMap>
 
     <sql id="selectFsPatientVo">

+ 11 - 7
fs-service/src/main/resources/mapper/hisStore/FsStoreProductCategoryScrmMapper.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.hisStore.mapper.FsStoreProductCategoryScrmMapper">
-    
+
     <resultMap type="FsStoreProductCategoryScrm" id="FsStoreProductCategoryResult">
         <result property="cateId"    column="cate_id"    />
         <result property="pid"    column="pid"    />
@@ -14,29 +14,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime"    column="create_time"    />
         <result property="updateTime"    column="update_time"    />
         <result property="isDel"    column="is_del"    />
+        <result property="storeId"    column="store_id"    />
     </resultMap>
 
     <sql id="selectFsStoreProductCategoryVo">
-        select cate_id, pid, cate_name, sort, pic, is_show, create_time, update_time, is_del from fs_store_product_category_scrm
+        select cate_id, pid, cate_name, sort, pic, is_show, create_time, update_time, is_del,store_id from fs_store_product_category_scrm
     </sql>
 
     <select id="selectFsStoreProductCategoryList" parameterType="FsStoreProductCategoryScrm" resultMap="FsStoreProductCategoryResult">
         <include refid="selectFsStoreProductCategoryVo"/>
-        <where>  
+        <where>
             <if test="pid != null "> and pid = #{pid}</if>
             <if test="cateName != null  and cateName != ''"> and cate_name like concat('%', #{cateName}, '%')</if>
             <if test="sort != null "> and sort = #{sort}</if>
             <if test="pic != null  and pic != ''"> and pic = #{pic}</if>
             <if test="isShow != null "> and is_show = #{isShow}</if>
             <if test="isDel != null "> and is_del = #{isDel}</if>
+            <if test="storeId != null "> and store_id = #{storeId}</if>
         </where>
     </select>
-    
+
     <select id="selectFsStoreProductCategoryById" parameterType="Long" resultMap="FsStoreProductCategoryResult">
         <include refid="selectFsStoreProductCategoryVo"/>
         where cate_id = #{cateId}
     </select>
-        
+
     <insert id="insertFsStoreProductCategory" parameterType="FsStoreProductCategoryScrm" useGeneratedKeys="true" keyProperty="cateId">
         insert into fs_store_product_category_scrm
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -48,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="isDel != null">is_del,</if>
+            <if test="storeId != null">store_id,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="pid != null">#{pid},</if>
@@ -58,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">#{createTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="isDel != null">#{isDel},</if>
+            <if test="storeId != null">#{storeId},</if>
          </trim>
     </insert>
 
@@ -86,5 +90,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{cateId}
         </foreach>
     </delete>
-    
-</mapper>
+
+</mapper>

+ 19 - 0
fs-service/src/main/resources/mapper/hisStore/FsStoreScrmMapper.xml

@@ -298,4 +298,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{storeId}
         </foreach>
     </select>
+    <select id="selectFsStoreListByProduct" resultType="com.fs.hisStore.domain.FsStoreScrm">
+        select s.*
+        from fs_store_scrm s
+        JOIN (
+        SELECT store_id
+        FROM fs_store_product_category_scrm
+        GROUP BY store_id
+        HAVING COUNT(*) > 0
+        ) c ON s.store_id = c.store_id
+        <where>
+            <if test="storeName != null  and storeName != ''"> and s.store_name like concat('%', #{storeName}, '%')</if>
+            <if test="address != null  and address != ''"> and s.address like concat('%', #{address}, '%')</if>
+            <if test="phone != null  and phone != ''"> and s.phone = #{phone}</if>
+            <if test="status != null "> and s.status = #{status}</if>
+            <if test="isAudit != null "> and s.is_audit = #{isAudit}</if>
+            <if test="account != null  and account != ''"> and s.account like concat('%', #{account}, '%')</if>
+        order by store_id desc
+        </where>
+    </select>
 </mapper>

+ 25 - 4
fs-store/src/main/java/com/fs/hisStore/controller/store/FsStoreProductCategoryScrmController.java

@@ -6,7 +6,10 @@ 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.ServletUtils;
 import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.framework.service.TokenServiceScrm;
+import com.fs.hisStore.domain.StoreLoginUserScrm;
 import com.fs.hisStore.vo.FsStoreProductCategoryVO;
 import com.fs.hisStore.vo.FsStoreProductCategorysVO;
 import com.fs.his.vo.OptionsVO;
@@ -27,6 +30,8 @@ import java.util.List;
 @RequestMapping("/store/store/storeProductCategory")
 public class FsStoreProductCategoryScrmController extends BaseController
 {
+    @Autowired
+    private TokenServiceScrm tokenService;
     @Autowired
     private IFsStoreProductCategoryScrmService fsStoreProductCategoryService;
 
@@ -37,7 +42,9 @@ public class FsStoreProductCategoryScrmController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(FsStoreProductCategoryScrm fsStoreProductCategory)
     {
-
+        StoreLoginUserScrm loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        Long storeId = loginUser.getFsStore().getStoreId();
+        fsStoreProductCategory.setStoreId(storeId);
         List<FsStoreProductCategoryVO> list = fsStoreProductCategoryService.selectFsStoreProductCategoryListVO(fsStoreProductCategory);
 
         return getDataTable(list);
@@ -82,6 +89,11 @@ public class FsStoreProductCategoryScrmController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody FsStoreProductCategoryScrm fsStoreProductCategory)
     {
+        Long storeId = tokenService.getLoginUser(ServletUtils.getRequest()).getFsStore().getStoreId();
+        if (storeId == null){
+            return AjaxResult.error("请先登录");
+        }
+        fsStoreProductCategory.setStoreId(storeId);
         return toAjax(fsStoreProductCategoryService.insertFsStoreProductCategory(fsStoreProductCategory));
     }
 
@@ -93,6 +105,11 @@ public class FsStoreProductCategoryScrmController extends BaseController
     @PutMapping
     public AjaxResult edit(@RequestBody FsStoreProductCategoryScrm fsStoreProductCategory)
     {
+        Long storeId = tokenService.getLoginUser(ServletUtils.getRequest()).getFsStore().getStoreId();
+        if (storeId == null){
+            return AjaxResult.error("请先登录");
+        }
+        fsStoreProductCategory.setStoreId(storeId);
         return toAjax(fsStoreProductCategoryService.updateFsStoreProductCategory(fsStoreProductCategory));
     }
 
@@ -110,15 +127,19 @@ public class FsStoreProductCategoryScrmController extends BaseController
     @GetMapping("/getAllList")
     public R getAllList(FsStoreProductCategoryScrm fsStoreProductCategory)
     {
-
-        List<FsStoreProductCategorysVO> list = fsStoreProductCategoryService.selectFsStoreProductCategorysVOList();
+        StoreLoginUserScrm loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        Long storeId = loginUser.getFsStore().getStoreId();
+        List<FsStoreProductCategorysVO> list = fsStoreProductCategoryService.selectFsStoreProductCategorysVOList(storeId);
         return R.ok().put("data", list);
     }
 
     @GetMapping("/getPidList")
     public R getPidList(FsStoreProductCategoryScrm fsStoreProductCategory)
     {
-        List<FsStoreProductCategoryVO> list = fsStoreProductCategoryService.getPidList();
+        StoreLoginUserScrm loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        Long storeId = loginUser.getFsStore().getStoreId();
+        fsStoreProductCategory.setStoreId(storeId);
+        List<FsStoreProductCategoryVO> list = fsStoreProductCategoryService.getPidList(storeId);
         return R.ok().put("data", list);
     }
 }

+ 1 - 1
fs-store/src/main/resources/application.yml

@@ -6,4 +6,4 @@ server:
 # Spring配置
 spring:
   profiles:
-    active: dev
+    active: dev-yjb

+ 5 - 1
fs-user-app/src/main/java/com/fs/app/controller/store/CommonScrmController.java

@@ -379,6 +379,8 @@ public class CommonScrmController extends AppBaseController {
         List<DictVO> storeProductTuiCate = dictDataService.selectDictDataListByType("store_product_tui_cate");
         List<DictVO> storeOrderType=dictDataService.selectDictDataListByType("store_order_type");
         List<DictVO> storeOrderMedium=dictDataService.selectDictDataListByType("store_order_medium");
+        List<DictVO> orderTypeOptions=dictDataService.selectDictDataListByType("sys_inquiry_order_type");
+        List<DictVO> inquiryTypeOptions=dictDataService.selectDictDataListByType("sys_inquiry_type");
         return R.ok()
                 .put("storeProductPackageCate", storeProductPackageCate)
                 .put("storeAfterSalesStatus", storeAfterSalesStatus)
@@ -390,7 +392,9 @@ public class CommonScrmController extends AppBaseController {
                 .put("storeAfterSalesReasons", storeAfterSalesReasons)
                 .put("storeProductTuiCate", storeProductTuiCate)
                 .put("storeOrderType",storeOrderType)
-                .put("storeOrderMedium",storeOrderMedium);
+                .put("storeOrderMedium",storeOrderMedium)
+                .put("orderTypeOptions",orderTypeOptions)
+                .put("inquiryTypeOptions",inquiryTypeOptions);
     }
 
     @GetMapping(value = "/getStoreConfig")

+ 5 - 3
fs-user-app/src/main/java/com/fs/app/controller/store/ProductScrmController.java

@@ -56,15 +56,16 @@ public class ProductScrmController extends AppBaseController {
     private IFsStoreScrmService storeScrmService;
     /**
      * 获取用户信息
-     * @param request
+     * @param storeId
      * @return     */
     @ApiOperation("获取分类")
     @GetMapping("/getProductCate")
-    public R getProductCate(HttpServletRequest request){
+    public R getProductCate(@RequestParam(name = "storeId",required = false) Long storeId){
         try {
             FsStoreProductCategoryScrm param=new FsStoreProductCategoryScrm();
             param.setIsShow(1);
             param.setIsDel(0);
+            param.setStoreId(storeId);
             List<FsStoreProductCategoryScrm> list=categoryService.selectFsStoreProductCategoryListQuery(param);
             return R.ok().put("data",list);
         } catch (Exception e){
@@ -73,12 +74,13 @@ public class ProductScrmController extends AppBaseController {
     }
     @ApiOperation("获取分类")
     @GetMapping("/getProductCateByPid")
-    public R getProductCateByPid(@RequestParam(value="pid") Long pid, HttpServletRequest request){
+    public R getProductCateByPid(@RequestParam(value="pid") Long pid, @RequestParam(value="storeId",required = false) Long storeId,HttpServletRequest request){
         try {
             FsStoreProductCategoryScrm param=new FsStoreProductCategoryScrm();
             param.setIsShow(1);
             param.setIsDel(0);
             param.setPid(pid);
+            param.setStoreId(storeId);
             List<FsStoreProductCategoryScrm> list=categoryService.selectFsStoreProductCategoryListQuery(param);
             return R.ok().put("data",list);
         } catch (Exception e){

+ 21 - 2
fs-user-app/src/main/java/com/fs/app/controller/store/StoreAfterSalesScrmController.java

@@ -6,6 +6,12 @@ import com.fs.app.controller.AppBaseController;
 import com.fs.common.annotation.RepeatSubmit;
 import com.fs.common.core.domain.R;
 import com.fs.common.utils.ParseUtils;
+import com.fs.his.domain.FsStoreAfterSales;
+import com.fs.his.domain.FsStoreAfterSalesItem;
+import com.fs.his.domain.FsStoreOrder;
+import com.fs.his.param.FsStoreAfterSalesListUParam;
+import com.fs.his.vo.FsStoreAfterSalesListUVO;
+import com.fs.his.vo.FsStoreOrderItemListUVO;
 import com.fs.hisStore.domain.FsStoreAfterSalesItemScrm;
 import com.fs.hisStore.domain.FsStoreAfterSalesScrm;
 import com.fs.hisStore.domain.FsStoreOrderScrm;
@@ -47,7 +53,7 @@ public class StoreAfterSalesScrmController extends AppBaseController {
     private IFsStoreOrderScrmService orderService;
     @Login
     @ApiOperation("获取订单项列表")
-    @GetMapping("/getMyStoreOrderItemByOrderId")
+    @GetMapping("/getStoreOrderItems")
     public R getMyStoreOrderById(@RequestParam("orderId") Long orderId, HttpServletRequest request){
         List<FsStoreOrderItemVO> list=itemService.selectFsStoreOrderItemListByOrderId(orderId);
         FsStoreOrderScrm order=orderService.selectFsStoreOrderById(orderId);
@@ -82,7 +88,8 @@ public class StoreAfterSalesScrmController extends AppBaseController {
 
 
     @Login
-    @GetMapping("/getAfterSalesList")
+//    @GetMapping("/getAfterSalesList")
+    @GetMapping("/getStoreAfterSalesList")
     @ApiOperation(value = "获取售后列表", notes = "获取售后列表")
     public R getAfterSalesList(FsStoreAfterSalesQueryParam param) {
         PageHelper.startPage(param.getPage(), param.getPageSize());
@@ -102,4 +109,16 @@ public class StoreAfterSalesScrmController extends AppBaseController {
         return R.ok().put("sales",sales).put("items", items);
     }
 
+    @Login
+    @GetMapping("/getStoreAfterSalesById")
+    @ApiOperation(value = "获取售后详情", notes = "获取售后详情")
+    public R getStoreAfterSalesById(@RequestParam("id") Long id) {
+        FsStoreAfterSalesScrm sales=storeAfterSalesService.selectFsStoreAfterSalesById(id);
+        FsStoreAfterSalesItemScrm map=new FsStoreAfterSalesItemScrm();
+        map.setStoreAfterSalesId(id);
+        List<FsStoreAfterSalesItemScrm>  items=salesItemService.selectFsStoreAfterSalesItemList(map);
+        FsStoreOrderScrm order=orderService.selectFsStoreOrderByOrderId(sales.getOrderId());
+        return R.ok().put("sales",sales).put("items", items).put("order",order);
+    }
+
 }