JiangChongBo 2 years ago
parent
commit
e2707ce7c9

+ 15 - 10
src/main/java/com/caimei365/commodity/service/impl/PageServiceImpl.java

@@ -1504,13 +1504,15 @@ public class PageServiceImpl implements PageService {
    @Override
    @Transactional
     public ResponseJson upEntryInfo(BaikeProductVo baikeProductVo){
-       //根据authUserId获取shopid
-       if(null!=baikeProductVo&&null!=baikeProductVo.getAuthUserId()){
-           Integer shopid = pageMapper.getShopid(baikeProductVo.getAuthUserId());
-           baikeProductVo.setShopId(shopid);
-           baikeProductVo.setPublishSource(2);
-       }
-
+//       //根据authUserId获取shopid
+//       if(null!=baikeProductVo&&null!=baikeProductVo.getAuthUserId()){
+//           Integer shopid = pageMapper.getShopid(baikeProductVo.getAuthUserId());
+//           baikeProductVo.setShopId(shopid);
+//           baikeProductVo.setPublishSource(2);
+//       }
+        if(null!=baikeProductVo &&null!=baikeProductVo.getShopId()){
+            baikeProductVo.setPublishSource(2);
+        }
        //保存词条信息
        if(null!=baikeProductVo&&baikeProductVo.getStatus()==1){
            Date date=new Date();
@@ -1595,9 +1597,12 @@ public class PageServiceImpl implements PageService {
     @Transactional
     public ResponseJson insertEntryInfo(BaikeProductVo baikeProductVo){
         //根据authUserId获取shopid
-        if(null!=baikeProductVo&&null!=baikeProductVo.getAuthUserId()){
-            Integer shopid = pageMapper.getShopid(baikeProductVo.getAuthUserId());
-            baikeProductVo.setShopId(shopid);
+//        if(null!=baikeProductVo&&null!=baikeProductVo.getAuthUserId()){
+//            Integer shopid = pageMapper.getShopid(baikeProductVo.getAuthUserId());
+//            baikeProductVo.setShopId(shopid);
+//            baikeProductVo.setPublishSource(2);
+//        }
+        if(null!=baikeProductVo &&null!=baikeProductVo.getShopId()){
             baikeProductVo.setPublishSource(2);
         }
         if(null!=baikeProductVo&&baikeProductVo.getStatus()==1){

+ 3 - 0
src/main/resources/mapper/PageMapper.xml

@@ -1099,6 +1099,9 @@
         <if test="null !=status">
             and  p.status=#{status}
         </if>
+        <if test="null !=shopId">
+            and  p.shopId=#{shopId}
+        </if>
         <if test="null !=name and '' != name">
             and  p.name like concat('%',#{name},'%')
         </if>